Skip to content

Commit eb25be9

Browse files
committed
Update requirements versions and adjust tests accordingly
1 parent bad6d4a commit eb25be9

11 files changed

+24
-18
lines changed

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
"sort-packages": true
77
},
88
"require": {
9-
"php": ">=5.6.0",
9+
"php": "^5.6|^7.0",
1010
"guzzlehttp/guzzle": "^6.0",
1111
"paragonie/random_compat": "^1|^2"
1212
},
1313
"require-dev": {
1414
"eloquent/liberator": "^2.0",
15-
"eloquent/phony": "^0.14.1",
16-
"jakub-onderka/php-parallel-lint": "~0.9",
17-
"phpunit/phpunit": "^5.0",
18-
"squizlabs/php_codesniffer": "^2.0"
15+
"eloquent/phony-phpunit": "^1.0|^3.0",
16+
"jakub-onderka/php-parallel-lint": "^0.9.2",
17+
"phpunit/phpunit": "^5.7|^6.0",
18+
"squizlabs/php_codesniffer": "^2.3|^3.0"
1919
},
2020
"keywords": [
2121
"oauth",

test/src/Grant/GrantFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use League\OAuth2\Client\Grant\AbstractGrant;
77
use League\OAuth2\Client\Grant\Exception\InvalidGrantException;
88
use League\OAuth2\Client\Test\Grant\Fake as MockGrant;
9-
use PHPUnit_Framework_TestCase as TestCase;
9+
use PHPUnit\Framework\TestCase;
1010

1111
class GrantFactoryTest extends TestCase
1212
{

test/src/Grant/GrantTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Eloquent\Phony\Phpunit\Phony;
66
use GuzzleHttp\ClientInterface;
7-
use PHPUnit_Framework_TestCase as TestCase;
7+
use PHPUnit\Framework\TestCase;
88
use Psr\Http\Message\ResponseInterface;
99
use Psr\Http\Message\StreamInterface;
1010
use League\OAuth2\Client\Token\AccessToken;

test/src/Provider/AbstractProviderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use League\OAuth2\Client\Token\AccessToken;
1414
use League\OAuth2\Client\Tool\RequestFactory;
1515
use League\OAuth2\Client\Provider\Exception\IdentityProviderException;
16-
use PHPUnit_Framework_TestCase as TestCase;
16+
use PHPUnit\Framework\TestCase;
1717
use Psr\Http\Message\ResponseInterface;
1818
use Psr\Http\Message\RequestInterface;
1919
use Psr\Http\Message\StreamInterface;

test/src/Provider/Exception/IdentityProviderException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use League\OAuth2\Client\Provider\Exception\IdentityProviderException;
66

7-
class IdentityProviderExceptionTest extends \PHPUnit_Framework_TestCase
7+
class IdentityProviderExceptionTest extends \PHPUnit\Framework\TestCase
88
{
99
protected $result;
1010

test/src/Provider/GenericProviderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use League\OAuth2\Client\Provider\GenericProvider;
88
use League\OAuth2\Client\Provider\GenericResourceOwner;
99
use League\OAuth2\Client\Token\AccessToken;
10-
use PHPUnit_Framework_TestCase as TestCase;
10+
use PHPUnit\Framework\TestCase;
1111
use Psr\Http\Message\ResponseInterface;
1212
use Psr\Http\Message\RequestInterface;
1313

test/src/Token/AccessTokenTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Eloquent\Phony\Phpunit\Phony;
66
use League\OAuth2\Client\Token\AccessToken;
7-
use PHPUnit_Framework_TestCase as TestCase;
7+
use PHPUnit\Framework\TestCase;
88

99
class AccessTokenTest extends TestCase
1010
{

test/src/Tool/ArrayAccessorTraitTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
namespace League\OAuth2\Client\Test\Tool;
44

55
use League\OAuth2\Client\Tool\ArrayAccessorTrait;
6-
use PHPUnit_Framework_TestCase;
6+
use PHPUnit\Framework\TestCase;
77

8-
class ArrayAccessorTraitTest extends PHPUnit_Framework_TestCase
8+
class ArrayAccessorTraitTest extends TestCase
99
{
1010
use ArrayAccessorTrait;
1111

test/src/Tool/ProviderRedirectTraitTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
use GuzzleHttp\ClientInterface;
77
use GuzzleHttp\Exception\BadResponseException;
88
use League\OAuth2\Client\Tool\ProviderRedirectTrait;
9-
use PHPUnit_Framework_TestCase;
9+
use PHPUnit\Framework\TestCase;
1010
use Psr\Http\Message\ResponseInterface;
1111
use Psr\Http\Message\RequestInterface;
1212

13-
class ProviderRedirectTraitTest extends PHPUnit_Framework_TestCase
13+
class ProviderRedirectTraitTest extends TestCase
1414
{
1515
use ProviderRedirectTrait;
1616

@@ -84,6 +84,8 @@ public function testClientLimitsRedirectResponse()
8484

8585
$this->setHttpClient($client->get())->setRedirectLimit($redirectLimit);
8686
$finalResponse = $this->getResponse($request->get());
87+
88+
$this->assertInstanceOf(ResponseInterface::class, $finalResponse);
8789
}
8890

8991
public function testClientLimitsRedirectLoopWhenRedirectNotDetected()
@@ -103,6 +105,8 @@ public function testClientLimitsRedirectLoopWhenRedirectNotDetected()
103105

104106
$this->setHttpClient($client->get())->setRedirectLimit($redirectLimit);
105107
$finalResponse = $this->getResponse($request->get());
108+
109+
$this->assertInstanceOf(ResponseInterface::class, $finalResponse);
106110
}
107111

108112
public function testClientErrorReturnsResponse()
@@ -123,5 +127,7 @@ public function testClientErrorReturnsResponse()
123127

124128
$this->setHttpClient($client->get());
125129
$finalResponse = $this->getResponse($request->get());
130+
131+
$this->assertInstanceOf(ResponseInterface::class, $finalResponse);
126132
}
127133
}

test/src/Tool/QueryBuilderTraitTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
namespace League\OAuth2\Client\Test\Tool;
44

55
use League\OAuth2\Client\Tool\QueryBuilderTrait;
6-
use PHPUnit_Framework_TestCase;
6+
use PHPUnit\Framework\TestCase;
77

8-
class QueryBuilderTraitTest extends PHPUnit_Framework_TestCase
8+
class QueryBuilderTraitTest extends TestCase
99
{
1010
use QueryBuilderTrait;
1111

0 commit comments

Comments
 (0)