@@ -35,7 +35,7 @@ protected function setUp()
35
35
public function testOnComment ()
36
36
{
37
37
$ event = new GitHubEvent ([
38
- 'issue ' => ['number ' => 1234 , 'labels ' => []], 'comment ' => ['user ' => ['login ' => 'nyholm ' ]],
38
+ 'issue ' => ['number ' => 1234 , 'state ' => ' open ' , ' labels ' => []], 'comment ' => ['user ' => ['login ' => 'nyholm ' ]],
39
39
], $ this ->repository );
40
40
41
41
$ this ->dispatcher ->dispatch ($ event , GitHubEvents::ISSUE_COMMENT );
@@ -47,7 +47,7 @@ public function testOnComment()
47
47
public function testOnCommentOnStale ()
48
48
{
49
49
$ 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 ' ]],
51
51
], $ this ->repository );
52
52
53
53
$ this ->dispatcher ->dispatch ($ event , GitHubEvents::ISSUE_COMMENT );
@@ -61,7 +61,19 @@ public function testOnCommentOnStale()
61
61
public function testOnBotCommentOnStale ()
62
62
{
63
63
$ 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 ' ]],
65
77
], $ this ->repository );
66
78
67
79
$ this ->dispatcher ->dispatch ($ event , GitHubEvents::ISSUE_COMMENT );
0 commit comments