Skip to content

Commit

Permalink
Upgrade guzzle and phpunit (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhhazelaar authored Mar 23, 2021
1 parent aea6cc5 commit 1169631
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 24 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ vendor/
bin/*
.php_cs.cache
.idea/
.phpunit.result.cache
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
}
},
"require-dev": {
"phpunit/phpunit": "4.5",
"satooshi/php-coveralls": "^0.6.1",
"kodus/mock-cache": "^1.0"
"phpunit/phpunit": "^9.5",
"kodus/mock-cache": "^1.0",
"php-coveralls/php-coveralls": "^2.4"
},
"require": {
"php" : ">=5.6.0",
"guzzlehttp/guzzle": "~6.0",
"php" : ">=7.4.0",
"guzzlehttp/guzzle": "^7.0",
"psr/simple-cache": "^1.0",
"symfony/options-resolver": ">=2.8",
"symfony/property-access":">=2.8"
Expand Down
10 changes: 0 additions & 10 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
convertWarningsToExceptions = "true"
processIsolation = "false"
stopOnFailure = "false"
syntaxCheck = "false"
bootstrap = "vendor/autoload.php" >

<testsuites>
Expand All @@ -17,13 +16,4 @@
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>.</directory>
<exclude>
<directory>tests</directory>
<directory>vendor</directory>
</exclude>
</whitelist>
</filter>
</phpunit>
2 changes: 1 addition & 1 deletion tests/JwtMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* @author Guillaume Cavavana <[email protected]>
*/
class JwtMiddlewareTest extends \PHPUnit_Framework_TestCase
class JwtMiddlewareTest extends \PHPUnit\Framework\TestCase
{
/**
* testJwtAuthorizationHeader.
Expand Down
2 changes: 1 addition & 1 deletion tests/JwtTokenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Eljam\GuzzleJwt\JwtToken;

class JwtTokenTest extends \PHPUnit_Framework_TestCase
class JwtTokenTest extends \PHPUnit\Framework\TestCase
{
public function testTokenShouldNotBeValidIfExpirationIsInThePast()
{
Expand Down
8 changes: 4 additions & 4 deletions tests/Manager/JwtManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* @author Guillaume Cavavana <[email protected]>
*/
class JwtManagerTest extends \PHPUnit_Framework_TestCase
class JwtManagerTest extends \PHPUnit\Framework\TestCase
{

/**
Expand All @@ -31,7 +31,7 @@ function (RequestInterface $request) {
$request->getHeaderLine('timeout')
);

$jsonPayload = <<<EOF
$jsonPayload = <<<EOF
{
"status": "success",
"message": "Login successful",
Expand Down Expand Up @@ -70,7 +70,7 @@ function (RequestInterface $request) {
]
);

$this->setExpectedException('Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException');
$this->expectException('Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException');

$token = $jwtManager->getJwtToken();
}
Expand All @@ -89,7 +89,7 @@ function (RequestInterface $request) {
$request->getHeaderLine('timeout')
);

$jsonPayload = <<<EOF
$jsonPayload = <<<EOF
{
"status": "success",
"message": "Login successful",
Expand Down
4 changes: 2 additions & 2 deletions tests/Persistence/TokenPersistenceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/**
* @author Nicolas Reynis (nreynis)
*/
class TokenPersistenceTest extends \PHPUnit_Framework_TestCase
class TokenPersistenceTest extends \PHPUnit\Framework\TestCase
{
/**
* testNullTokenPersistence.
Expand All @@ -33,7 +33,7 @@ public function testNullTokenPersistence()
*/
public function testSimpleCacheTokenPersistenceInterface()
{
$simpleCache = $this->getMock(CacheInterface::class);
$simpleCache = $this->createMock(CacheInterface::class);
$tokenPersistence = new SimpleCacheTokenPersistence($simpleCache);
$token = new JwtToken('foo', new \DateTime('now'));

Expand Down
2 changes: 1 addition & 1 deletion tests/Strategy/Auth/AuthStrategyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* @author Guillaume Cavavana <[email protected]>
*/
class AuthStrategyTest extends \PHPUnit_Framework_TestCase
class AuthStrategyTest extends \PHPUnit\Framework\TestCase
{
/**
* testFormAuthStrategy.
Expand Down

0 comments on commit 1169631

Please sign in to comment.