Skip to content

Commit

Permalink
Updated - test with PHP 5.6, Travis CI config
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Igna committed Jan 7, 2019
1 parent a76f69e commit cac87c5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 3 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,15 @@ cache:
env: MINIMUM_VERSIONS=false

php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3


matrix:
include:
- php: 7.1
env: MINIMUM_VERSIONS=true

install:
- if [[ $MINIMUM_VERSIONS = false ]]; then composer install; fi
- if [[ $MINIMUM_VERSIONS = true ]]; then composer update --no-interaction --prefer-lowest; fi
- composer install --no-interaction

script:
- composer run test
6 changes: 4 additions & 2 deletions test/src/Provider/WordPressComTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
namespace Layered\OAuth2\Client\Test\Provider;

use Layered\OAuth2\Client\Provider\WordPressCom;
use League\OAuth2\Client\Provider\ResourceOwnerInterface;
use League\OAuth2\Client\Provider\Exception\IdentityProviderException;
use League\OAuth2\Client\Token\AccessTokenInterface;
use League\OAuth2\Client\Token\AccessToken;
use PHPUnit\Framework\TestCase;
use Mockery as m;
Expand Down Expand Up @@ -60,7 +62,7 @@ public function testGetAccessToken()

$token = $this->provider->getAccessToken('authorization_code', ['code' => 'mock_authorization_code']);

$this->assertInstanceOf('League\OAuth2\Client\Token\AccessTokenInterface', $token);
$this->assertInstanceOf(AccessTokenInterface::class, $token);
$this->assertEquals('mock_access_token', $token->getToken());
$this->assertNull($token->getExpires());
$this->assertNull($token->getRefreshToken());
Expand Down Expand Up @@ -98,7 +100,7 @@ public function testUserData()

$user = $this->provider->getResourceOwner($this->getMockToken());

$this->assertInstanceOf('League\OAuth2\Client\Provider\ResourceOwnerInterface', $user);
$this->assertInstanceOf(ResourceOwnerInterface::class, $user);
$this->assertEquals($mockUser['ID'], $user->getId());
$this->assertEquals($mockUser['username'], $user->getUsername());
$this->assertEquals($mockUser['email'], $user->getEmail());
Expand Down

0 comments on commit cac87c5

Please sign in to comment.