Skip to content

Commit aeeda19

Browse files
committed
Added comment on AbstractApi::$perPage
1 parent 91f2aa4 commit aeeda19

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

lib/Github/Api/AbstractApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ abstract class AbstractApi
2020
private $client;
2121

2222
/**
23-
* The per page parameter.
23+
* The per page parameter. It is used by the ResultPager.
2424
*
2525
* @var int|null
2626
*/

test/Github/Tests/Integration/ResultPagerTest.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,6 @@
99
*/
1010
class ResultPagerTest extends TestCase
1111
{
12-
/**
13-
* @test
14-
*/
15-
public function shouldPaginateGetRequests()
16-
{
17-
$repositoriesApi = $this->client->api('user');
18-
$repositoriesApi->setPerPage(10);
19-
20-
$pager = $this->createPager();
21-
22-
$repositories = $pager->fetch($repositoriesApi, 'repositories', ['KnpLabs']);
23-
$this->assertCount(10, $repositories);
24-
25-
$repositoriesApi->setPerPage(20);
26-
$repositories = $pager->fetch($repositoriesApi, 'repositories', ['KnpLabs']);
27-
$this->assertCount(20, $repositories);
28-
}
29-
3012
/**
3113
* @test
3214
*
@@ -43,10 +25,8 @@ public function shouldPaginateGetRequests()
4325
public function shouldGetAllResultsFromSearchApi()
4426
{
4527
$searchApi = $this->client->search();
46-
$searchApi->setPerPage(10);
4728

4829
$pager = $this->createPager();
49-
5030
$users = $pager->fetch($searchApi, 'users', ['location:Kyiv']);
5131
$this->assertCount(10, $users);
5232
}

0 commit comments

Comments
 (0)