File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -56,9 +56,9 @@ public function testOnPullRequestOpen()
56
56
57
57
public function testOnPullRequestOpenWIP ()
58
58
{
59
- $ this ->statusApi ->expects ($ this ->never ())
59
+ $ this ->statusApi ->expects ($ this ->once ())
60
60
->method ('setIssueStatus ' )
61
- ->with (1234 , Status::NEEDS_REVIEW );
61
+ ->with (1234 , Status::NEEDS_WORK );
62
62
63
63
$ event = new GitHubEvent ([
64
64
'action ' => 'opened ' ,
@@ -68,7 +68,9 @@ public function testOnPullRequestOpenWIP()
68
68
$ this ->dispatcher ->dispatch ($ event , GitHubEvents::PULL_REQUEST );
69
69
70
70
$ responseData = $ event ->getResponseData ();
71
- $ this ->assertEmpty ($ responseData );
71
+ $ this ->assertCount (2 , $ responseData );
72
+ $ this ->assertSame (1234 , $ responseData ['pull_request ' ]);
73
+ $ this ->assertSame (Status::NEEDS_WORK , $ responseData ['status_change ' ]);
72
74
}
73
75
74
76
public function testOnPullRequestNotOpen ()
You can’t perform that action at this time.
0 commit comments