Skip to content

Commit ce60841

Browse files
committed
Fix phpunit deprecation warnings after update of dependencies
Update .gitignore, clean .travis.yml
1 parent a7a2681 commit ce60841

File tree

7 files changed

+48
-71
lines changed

7 files changed

+48
-71
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
vendor/
22
composer.lock
3+
phpunit.xml

.gitmodules

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

.travis.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
language: php
22

3-
php:
4-
- 7.0
5-
- 5.6
6-
- 5.3
7-
- hhvm
8-
93
sudo: false
104

115
cache:
@@ -15,8 +9,14 @@ cache:
159
matrix:
1610
fast_finish: true
1711
include:
12+
- php: hhvm-stable
13+
sudo: required
14+
dist: trusty
15+
group: edge
1816
- php: 5.3
1917
env: COMPOSER_FLAGS="--prefer-lowest"
18+
- php: 5.4
19+
- php: 5.5
2020
- php: 5.6
2121
env: SYMFONY_VERSION=2.3.*
2222
- php: 5.6
@@ -27,12 +27,10 @@ matrix:
2727
env: SYMFONY_VERSION=3.0.*
2828
- php: 7.0
2929
env: SYMFONY_VERSION=3.1.*
30-
allow_failures:
31-
- php: hhvm
30+
- php: 7.1
3231

3332
before_install:
34-
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then phpenv config-rm xdebug.ini; fi;
35-
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then echo "memory_limit=2G" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
33+
- if [[ "$TRAVIS_PHP_VERSION" != "hhvm-stable" ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi;
3634

3735
before_script:
3836
- composer self-update

composer.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@
3838
}
3939
},
4040

41-
"minimum-stability": "dev",
42-
"prefer-stable": true,
43-
4441
"extra": {
4542
"branch-alias": {
4643
"dev-master": "1.2.x-dev"

tests/OAuth2ImplicitGrantTypeTest.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,12 @@
1111
*/
1212
class OAuth2ImplicitGrantTypeTest extends PHPUnit_Framework_TestCase
1313
{
14-
/**
15-
* The actual token ID is irrelevant, so choose one:
16-
* @var string
17-
*/
18-
private $tokenId = 'my_token';
19-
2014
/**
2115
* Tests OAuth2->grantAccessToken() with implicit
2216
*
2317
*/
2418
public function testGrantAccessTokenWithGrantImplicit()
2519
{
26-
//$this->fixture->grantAccessToken(/* parameters */);
27-
2820
$stub = new OAuth2ImplicitStub();
2921
$stub->addClient(new OAuth2Client('blah', 'foo', array('http://www.example.com/')));
3022
$oauth2 = new OAuth2($stub);
@@ -56,7 +48,7 @@ public function testRejectedAccessTokenWithGrantImplicit()
5648
$data = new \stdClass();
5749

5850
try {
59-
$response = $oauth2->finishClientAuthorization(false, $data, new Request(array(
51+
$oauth2->finishClientAuthorization(false, $data, new Request(array(
6052
'client_id' => 'blah',
6153
'redirect_uri' => 'http://www.example.com/?foo=bar',
6254
'state' => '42',

tests/OAuth2OutputTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Symfony\Component\HttpFoundation\Request;
77

88
/**
9-
* OAuth2 test cases that invovle capturing output.
9+
* OAuth2 test cases that involve capturing output.
1010
*/
1111
class OAuth2OutputTest extends PHPUnit_Framework_TestCase
1212
{
@@ -35,7 +35,7 @@ public function testGrantAccessTokenWithGrantAuthCodeSuccess()
3535
$response = $this->fixture->grantAccessToken($request);
3636

3737
// Successful token grant will return a JSON encoded token:
38-
$this->assertRegexp('/{"access_token":".*","expires_in":\d+,"token_type":"bearer"/', $response->getContent());
38+
$this->assertRegExp('/{"access_token":".*","expires_in":\d+,"token_type":"bearer"/', $response->getContent());
3939
}
4040

4141
/**
@@ -58,7 +58,7 @@ public function testGrantAccessTokenWithGrantAuthCodeSuccessWithoutRedirect()
5858
$response = $this->fixture->grantAccessToken($request);
5959

6060
// Successful token grant will return a JSON encoded token:
61-
$this->assertRegexp('/{"access_token":".*","expires_in":\d+,"token_type":"bearer"/', $response->getContent());
61+
$this->assertRegExp('/{"access_token":".*","expires_in":\d+,"token_type":"bearer"/', $response->getContent());
6262
}
6363

6464
// Utility methods
@@ -71,7 +71,7 @@ protected function createBaseMock($interfaceName)
7171
{
7272
$client = new OAuth2Client('my_little_app');
7373

74-
$mockStorage = $this->getMock($interfaceName);
74+
$mockStorage = $this->getMockBuilder($interfaceName)->getMock();
7575
$mockStorage->expects($this->any())
7676
->method('getClient')
7777
->will($this->returnCallback(function ($id) use ($client) {
@@ -88,5 +88,4 @@ protected function createBaseMock($interfaceName)
8888

8989
return $mockStorage;
9090
}
91-
9291
}

0 commit comments

Comments
 (0)