@@ -35,7 +35,7 @@ protected function setUp()
3535 public function testOnComment ()
3636 {
3737 $ event = new GitHubEvent ([
38- 'issue ' => ['number ' => 1234 , 'labels ' => []], 'comment ' => ['user ' => ['login ' => 'nyholm ' ]],
38+ 'issue ' => ['number ' => 1234 , 'state ' => ' open ' , ' labels ' => []], 'comment ' => ['user ' => ['login ' => 'nyholm ' ]],
3939 ], $ this ->repository );
4040
4141 $ this ->dispatcher ->dispatch ($ event , GitHubEvents::ISSUE_COMMENT );
@@ -47,7 +47,7 @@ public function testOnComment()
4747 public function testOnCommentOnStale ()
4848 {
4949 $ event = new GitHubEvent ([
50- 'issue ' => ['number ' => 1234 , 'labels ' => [['name ' => 'Foo ' ], ['name ' => 'Stalled ' ]]], 'comment ' => ['user ' => ['login ' => 'nyholm ' ]],
50+ 'issue ' => ['number ' => 1234 , 'state ' => ' open ' , ' labels ' => [['name ' => 'Foo ' ], ['name ' => 'Stalled ' ]]], 'comment ' => ['user ' => ['login ' => 'nyholm ' ]],
5151 ], $ this ->repository );
5252
5353 $ this ->dispatcher ->dispatch ($ event , GitHubEvents::ISSUE_COMMENT );
@@ -61,7 +61,19 @@ public function testOnCommentOnStale()
6161 public function testOnBotCommentOnStale ()
6262 {
6363 $ event = new GitHubEvent ([
64- 'issue ' => ['number ' => 1234 , 'labels ' => [['name ' => 'Foo ' ], ['name ' => 'Stalled ' ]]], 'comment ' => ['user ' => ['login ' => 'carsonbot ' ]],
64+ 'issue ' => ['number ' => 1234 , 'state ' => 'open ' , 'labels ' => [['name ' => 'Foo ' ], ['name ' => 'Stalled ' ]]], 'comment ' => ['user ' => ['login ' => 'carsonbot ' ]],
65+ ], $ this ->repository );
66+
67+ $ this ->dispatcher ->dispatch ($ event , GitHubEvents::ISSUE_COMMENT );
68+
69+ $ responseData = $ event ->getResponseData ();
70+ $ this ->assertEmpty ($ responseData );
71+ }
72+
73+ public function testCommentOnClosed ()
74+ {
75+ $ event = new GitHubEvent ([
76+ 'issue ' => ['number ' => 1234 , 'state ' => 'closed ' , 'labels ' => [['name ' => 'Foo ' ], ['name ' => 'Stalled ' ]]], 'comment ' => ['user ' => ['login ' => 'nyholm ' ]],
6577 ], $ this ->repository );
6678
6779 $ this ->dispatcher ->dispatch ($ event , GitHubEvents::ISSUE_COMMENT );
0 commit comments