-
Notifications
You must be signed in to change notification settings - Fork 749
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
197 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,4 +41,4 @@ public function testAsStringWithCode() | |
|
||
$this->assertEquals('message: 404: message', (string)$exception); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace League\OAuth2\Client\Test\Provider; | ||
|
||
use Ivory\HttpAdapter\Message\Stream\StringStream; | ||
use Mockery as m; | ||
|
||
abstract class ConcreteProviderTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @var \League\OAuth2\Client\Provider\AbstractProvider | ||
*/ | ||
protected $provider; | ||
|
||
protected function tearDown() | ||
{ | ||
m::close(); | ||
parent::tearDown(); | ||
} | ||
|
||
protected function createMockHttpClient() | ||
{ | ||
$client = m::mock('Ivory\HttpAdapter\HttpAdapterInterface'); | ||
$client->shouldReceive('getConfiguration')->andReturn(new \Ivory\HttpAdapter\Configuration()); | ||
|
||
return $client; | ||
} | ||
|
||
protected function createMockResponse($responseBody) | ||
{ | ||
$response = m::mock('Ivory\HttpAdapter\Message\ResponseInterface'); | ||
$response->shouldReceive('getBody')->andReturn(new StringStream($responseBody)); | ||
|
||
return $response; | ||
} | ||
} |
Oops, something went wrong.