Skip to content

Commit 2ba4c5d

Browse files
committed
Bump phpunit to supported version
1 parent 46ffb70 commit 2ba4c5d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+179
-115
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.php_cs.cache
22
phpunit.xml
3+
.phpunit.result.cache
34
composer.lock
45
composer.phar
56
vendor/*

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"php-http/cache-plugin": "^1.4"
2828
},
2929
"require-dev": {
30-
"phpunit/phpunit": "^6.0",
30+
"phpunit/phpunit": "^7.0 || ^8.0",
3131
"php-http/guzzle6-adapter": "^1.0",
3232
"php-http/mock-client": "^1.0",
3333
"guzzlehttp/psr7": "^1.2",

phpunit.xml.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
convertWarningsToExceptions="true"
99
processIsolation="false"
1010
stopOnFailure="false"
11-
syntaxCheck="false"
1211
bootstrap="vendor/autoload.php"
1312
>
1413
<testsuites>

test/Github/Tests/Api/AbstractApiTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,13 @@ public function shouldNotPassEmptyRefToClient()
171171
$api = $this->getAbstractApiObject($client);
172172
$actual = $this->getMethod($api, 'get')->invokeArgs($api, ['/path', ['ref' => null]]);
173173

174-
$this->assertInternalType('array', $actual);
174+
$this->assertIsArray($actual);
175175
}
176176

177177
/**
178178
* @param $client
179179
*
180-
* @return \PHPUnit_Framework_MockObject_MockObject
180+
* @return \PHPUnit\Framework\MockObject\MockObject
181181
*/
182182
protected function getAbstractApiObject($client)
183183
{

test/Github/Tests/Api/CurrentUser/DeployKeysTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?php
22

3-
namespace Github\Tests\Api;
3+
namespace Github\Tests\Api\CurrentUser;
4+
5+
use Github\Exception\MissingArgumentException;
6+
use Github\Tests\Api\TestCase;
47

58
class DeployKeysTest extends TestCase
69
{
@@ -55,10 +58,10 @@ public function shouldCreateKey()
5558

5659
/**
5760
* @test
58-
* @expectedException \Github\Exception\MissingArgumentException
5961
*/
6062
public function shouldNotCreateKeyWithoutTitleParam()
6163
{
64+
$this->expectException(MissingArgumentException::class);
6265
$data = ['key' => 'ssh-rsa ...'];
6366

6467
$api = $this->getApiMock();
@@ -70,10 +73,10 @@ public function shouldNotCreateKeyWithoutTitleParam()
7073

7174
/**
7275
* @test
73-
* @expectedException \Github\Exception\MissingArgumentException
7476
*/
7577
public function shouldNotCreateKeyWithoutKeyParam()
7678
{
79+
$this->expectException(MissingArgumentException::class);
7780
$data = ['title' => 'my key'];
7881

7982
$api = $this->getApiMock();

test/Github/Tests/Api/CurrentUser/EmailsTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?php
22

3-
namespace Github\Tests\Api;
3+
namespace Github\Tests\Api\CurrentUser;
4+
5+
use Github\Exception\InvalidArgumentException;
6+
use Github\Tests\Api\TestCase;
47

58
class EmailsTest extends TestCase
69
{
@@ -54,10 +57,10 @@ public function shouldRemoveEmails()
5457

5558
/**
5659
* @test
57-
* @expectedException \Github\Exception\InvalidArgumentException
5860
*/
5961
public function shouldNotRemoveEmailsWhenAreNotPass()
6062
{
63+
$this->expectException(InvalidArgumentException::class);
6164
$api = $this->getApiMock();
6265
$api->expects($this->any())
6366
->method('delete');
@@ -99,10 +102,10 @@ public function shouldAddEmails()
99102

100103
/**
101104
* @test
102-
* @expectedException \Github\Exception\InvalidArgumentException
103105
*/
104106
public function shouldNotAddEmailsWhenAreNotPass()
105107
{
108+
$this->expectException(InvalidArgumentException::class);
106109
$api = $this->getApiMock();
107110
$api->expects($this->any())
108111
->method('post');

test/Github/Tests/Api/CurrentUser/FollowersTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22

3-
namespace Github\Tests\Api;
3+
namespace Github\Tests\Api\CurrentUser;
4+
5+
use Github\Tests\Api\TestCase;
46

57
class FollowersTest extends TestCase
68
{

test/Github/Tests/Api/CurrentUser/MembershipsTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22

3-
namespace Github\Tests\Api;
3+
namespace Github\Tests\Api\CurrentUser;
4+
5+
use Github\Tests\Api\TestCase;
46

57
class MembershipsTest extends TestCase
68
{

test/Github/Tests/Api/CurrentUser/StarringTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22

3-
namespace Github\Tests\Api;
3+
namespace Github\Tests\Api\CurrentUser;
4+
5+
use Github\Tests\Api\TestCase;
46

57
class StarringTest extends TestCase
68
{

test/Github/Tests/Api/CurrentUser/WatchersTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22

3-
namespace Github\Tests\Api;
3+
namespace Github\Tests\Api\CurrentUser;
4+
5+
use Github\Tests\Api\TestCase;
46

57
class WatchersTest extends TestCase
68
{

0 commit comments

Comments
 (0)