Skip to content

Commit 633e004

Browse files
carusogabrielNyholm
authored andcommitted
Refactoring tests (#664)
1 parent dc10d86 commit 633e004

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function shouldReturnTrueWhenFileExists()
5353
->with('/repos/KnpLabs/php-github-api/contents/composer.json', array('ref' => null))
5454
->will($this->returnValue($response));
5555

56-
$this->assertEquals(true, $api->exists('KnpLabs', 'php-github-api', 'composer.json'));
56+
$this->assertTrue($api->exists('KnpLabs', 'php-github-api', 'composer.json'));
5757
}
5858

5959
public function getFailureStubsForExistsTest()

test/Github/Tests/Integration/RepoTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function shouldShowPRDiffIfHeaderIsPresent()
2121

2222
$diff = $this->client->api('pull_request')->show('KnpLabs', 'php-github-api', '92');
2323

24-
$this->assertTrue('string' === gettype($diff));
24+
$this->assertInternalType('string', $diff);
2525
}
2626

2727
/**

test/Github/Tests/ResultPagerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function shouldGetAllResults()
5252
$paginator = new ResultPager($client);
5353
$result = $paginator->fetchAll($memberApi, $method, $parameters);
5454

55-
$this->assertEquals($amountLoops * count($content), count($result));
55+
$this->assertCount($amountLoops * count($content), $result);
5656
}
5757

5858
/**
@@ -94,7 +94,7 @@ public function shouldGetAllSearchResults()
9494
$paginator = new ResultPager($client);
9595
$result = $paginator->fetchAll($searchApi, $method, array('knplabs'));
9696

97-
$this->assertEquals($amountLoops * count($content['items']), count($result));
97+
$this->assertCount($amountLoops * count($content['items']), $result);
9898
}
9999

100100
public function testFetch()

0 commit comments

Comments
 (0)