Skip to content

Commit c11d530

Browse files
author
Luca Degasperi
committed
Fixed a typo in the tests syntax
1 parent 20021d8 commit c11d530

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

.coveralls.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/AuthorizationServerProxyTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public function getProxy($mock)
1010
return new AuthorizationServerProxy($mock);
1111
}
1212

13-
public function getMock()
13+
public function getServer()
1414
{
1515
return m::mock('League\OAuth2\Server\Authorization');
1616
}
@@ -29,7 +29,7 @@ public function getStub()
2929

3030
public function test_make_redirect()
3131
{
32-
$proxy = $this->getProxy($this->getMock());
32+
$proxy = $this->getProxy($this->getServer());
3333

3434
$result = $proxy->makeRedirect('example');
3535

@@ -38,7 +38,7 @@ public function test_make_redirect()
3838

3939
public function test_make_redirect_with_code()
4040
{
41-
$proxy = $this->getProxy($this->getMock());
41+
$proxy = $this->getProxy($this->getServer());
4242

4343
$result = $proxy->makeRedirectWithCode('1234567890', array('redirect_uri' => 'example'));
4444

@@ -51,7 +51,7 @@ public function test_make_redirect_with_code()
5151

5252
public function test_make_redirect_with_error()
5353
{
54-
$mock = $this->getMock();
54+
$mock = $this->getServer();
5555
$mock->shouldReceive('getExceptionMessage')->twice()->andReturn('error_message');
5656

5757
$proxy = $this->getProxy($mock);
@@ -67,7 +67,7 @@ public function test_make_redirect_with_error()
6767

6868
public function test_check_authorize_params()
6969
{
70-
$mock = $this->getMock();
70+
$mock = $this->getServer();
7171
$mock->shouldReceive('getGrantType->checkAuthoriseParams')->andReturn($this->getStub());
7272

7373
$response = $this->getProxy($mock)->checkAuthorizeParams();
@@ -77,7 +77,7 @@ public function test_check_authorize_params()
7777

7878
public function test_access_token_correctly_issued()
7979
{
80-
$mock = $this->getMock();
80+
$mock = $this->getServer();
8181
$mock->shouldReceive('issueAccessToken')->once()->andReturn(array('foo' => 'bar'));
8282

8383
$response = $this->getProxy($mock)->performAccessTokenFlow();
@@ -89,7 +89,7 @@ public function test_access_token_correctly_issued()
8989

9090
public function test_access_token_with_client_error()
9191
{
92-
$mock = $this->getMock();
92+
$mock = $this->getServer();
9393
$mock->shouldReceive('issueAccessToken')->once()->andThrow(new League\OAuth2\Server\Exception\ClientException('client exception'));
9494
$mock->shouldReceive('getExceptionType')->twice()->andReturn('foo');
9595
$mock->shouldReceive('getExceptionHttpHeaders')->once()->andReturn(array());
@@ -103,7 +103,7 @@ public function test_access_token_with_client_error()
103103

104104
public function test_access_token_with_generic_error()
105105
{
106-
$mock = $this->getMock();
106+
$mock = $this->getServer();
107107
$mock->shouldReceive('issueAccessToken')->once()->andThrow(new Exception('internal server error'));
108108

109109
$response = $this->getProxy($mock)->performAccessTokenFlow();
@@ -115,7 +115,7 @@ public function test_access_token_with_generic_error()
115115

116116
public function test_calls_to_underlying_object()
117117
{
118-
$mock = $this->getMock();
118+
$mock = $this->getServer();
119119
$mock->shouldReceive('unexistingMethod')->times(6)->andReturn('baz');
120120

121121
$proxy = $this->getProxy($mock);

0 commit comments

Comments
 (0)