Skip to content

Commit a886a1b

Browse files
committed
Throw exception if unknown auth method is used.
Removed ambiguous phpdocs from tests.
1 parent eb1702c commit a886a1b

40 files changed

+13
-195
lines changed

lib/Github/HttpClient/Listener/AuthListener.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ public function preSend(RequestInterface $request)
9090

9191
$request->fromUrl(new Url($url));
9292
break;
93+
94+
default:
95+
throw new InvalidArgumentException(sprintf('Unknown method called "%s".', $this->method));
9396
}
9497
}
9598

test/Github/Tests/Api/AbstractApiTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Api\AbstractApi;
66

7-
/**
8-
* AbstractApi test case
9-
*
10-
* @author Leszek Prabucki <[email protected]>
11-
*/
127
class AbstractApiTest extends \PHPUnit_Framework_TestCase
138
{
149
/**

test/Github/Tests/Api/CurrentUser/DeployKeysTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* CurrentUser deploy keys api test case
9-
*
10-
* @author Leszek Prabucki <[email protected]>
11-
*/
127
class DeployKeysTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/CurrentUser/EmailsTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* CurrentUser emails api test case
9-
*
10-
* @author Leszek Prabucki <[email protected]>
11-
*/
127
class EmailsTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/CurrentUser/FollowersTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* CurrentUser followers api test case
9-
*
10-
* @author Joseph Bielawski <[email protected]>
11-
*/
127
class FollowersTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/CurrentUser/WatchersTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* CurrentUser watchers api test case
9-
*
10-
* @author Joseph Bielawski <[email protected]>
11-
*/
127
class WatchersTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/CurrentUserTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
namespace Github\Tests\Api;
44

5-
/**
6-
* CurrentUser api test case
7-
*
8-
* @author Leszek Prabucki <[email protected]>
9-
*/
105
class CurrentUserTest extends TestCase
116
{
127
/**

test/Github/Tests/Api/GistsTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
namespace Github\Tests\Api;
44

5-
/**
6-
* Gist api test case
7-
*
8-
* @author Leszek Prabucki <[email protected]>
9-
*/
105
class GistsTest extends TestCase
116
{
127
/**

test/Github/Tests/Api/GitData/BlobsTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* GitData blobs api test case
9-
*
10-
* @author Leszek Prabucki <[email protected]>
11-
*/
127
class BlobsTest extends TestCase
138
{
149
/**

test/Github/Tests/Api/GitData/CommitsTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
use Github\Tests\Api\TestCase;
66

7-
/**
8-
* GitData commits api test case
9-
*
10-
* @author Leszek Prabucki <[email protected]>
11-
*/
127
class CommitsTest extends TestCase
138
{
149
/**

0 commit comments

Comments
 (0)