Skip to content

Commit 86b531f

Browse files
committed
Add shouldShowCommitsFromPullRequestForPage
1 parent 2069be2 commit 86b531f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/Github/Tests/Api/PullRequestTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,22 @@ public function shouldShowCommitsFromPullRequest()
8787
$this->assertEquals($expectedArray, $api->commits('ezsystems', 'ezpublish', '15'));
8888
}
8989

90+
/**
91+
* @test
92+
*/
93+
public function shouldShowCommitsFromPullRequestForPage()
94+
{
95+
$expectedArray = [['id' => 'id', 'sha' => '123123']];
96+
97+
$api = $this->getApiMock();
98+
$api->expects($this->once())
99+
->method('get')
100+
->with('/repos/ezsystems/ezpublish/pulls/15/commits', ['page' => 2, 'per_page' => 30])
101+
->willReturn($expectedArray);
102+
103+
$this->assertEquals($expectedArray, $api->commits('ezsystems', 'ezpublish', '15', ['page' => 2, 'per_page' => 30]));
104+
}
105+
90106
/**
91107
* @test
92108
*/

0 commit comments

Comments
 (0)