Skip to content

Commit fb030b4

Browse files
committed
Add tests
1 parent 6b50566 commit fb030b4

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

test/Github/Tests/Api/Repository/ChecksTest.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,45 @@ public function shouldUpdateCheck()
7171
$this->assertEquals($expectedValue, $api->update('KnpLabs', 'php-github-api', '123', $data));
7272
}
7373

74+
/**
75+
* @test
76+
*/
77+
public function shouldGetAllChecksForRef()
78+
{
79+
$api = $this->getApiMock();
80+
$api->expects($this->once())
81+
->method('get')
82+
->with('/repos/KnpLabs/php-github-api/commits/cb4abc15424c0015b4468d73df55efb8b60a4a3d/check-runs');
83+
84+
$api->all('KnpLabs', 'php-github-api', 'cb4abc15424c0015b4468d73df55efb8b60a4a3d');
85+
}
86+
87+
/**
88+
* @test
89+
*/
90+
public function shouldShowSingleCheckRun()
91+
{
92+
$api = $this->getApiMock();
93+
$api->expects($this->once())
94+
->method('get')
95+
->with('/repos/KnpLabs/php-github-api/check-runs/14');
96+
97+
$api->show('KnpLabs', 'php-github-api', 14);
98+
}
99+
100+
/**
101+
* @test
102+
*/
103+
public function shouldListCheckRunAnnotations()
104+
{
105+
$api = $this->getApiMock();
106+
$api->expects($this->once())
107+
->method('get')
108+
->with('/repos/KnpLabs/php-github-api/check-runs/14/annotations');
109+
110+
$api->annotations('KnpLabs', 'php-github-api', 14);
111+
}
112+
74113
/**
75114
* @return string
76115
*/

0 commit comments

Comments
 (0)