Skip to content

Commit 9701bac

Browse files
committed
Invert removal of method. Throw exception instead
1 parent 206845d commit 9701bac

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

lib/Github/Api/Repo.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ public function search($query, $language = '', $startPage = 1)
3232
return $response['repositories'];
3333
}
3434

35+
/**
36+
* Get a list of the repositories that the authenticated user can push to
37+
*
38+
* @return array list of repositories
39+
*/
40+
public function getPushableRepos()
41+
{
42+
throw new \BadMethodCallException('Method cannot be implemented using new api version');
43+
}
44+
3545
/**
3646
* Get the repositories of a user
3747
* http://develop.github.com/p/repo.html

test/Github/Tests/Api/RepoTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ public function testSearch()
2020
$api->search('github api', 'fr', 3);
2121
}
2222

23+
/**
24+
* @expectedException BadMethodCallException
25+
*/
26+
public function testThatPushableReposIsNotSupported()
27+
{
28+
$api = $this->getApiMock();
29+
30+
$api->getPushableRepos();
31+
}
32+
2333
protected function getApiClass()
2434
{
2535
return 'Github\Api\Repo';

0 commit comments

Comments
 (0)