Skip to content

Commit 55c8547

Browse files
committed
Upgrade tests to PHPUnit 9 for PHP 8
1 parent 5192654 commit 55c8547

File tree

3 files changed

+6
-27
lines changed

3 files changed

+6
-27
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"require": {
1313
"ivopetkov/html5-dom-document-php": "^1.1",
1414
"nesbot/carbon": "^2.7",
15-
"php": "^7.1"
15+
"php": "^7.1 || ^8.0"
1616
},
1717
"require-dev": {
18-
"phpunit/phpunit": "^7.0"
18+
"phpunit/phpunit": "^9.6"
1919
},
2020
"autoload": {
2121
"psr-4": {

phpunit.xml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
4-
bootstrap="vendor/autoload.php"
2+
<phpunit bootstrap="vendor/autoload.php"
53
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false">
4+
cacheResult="false">
115
<testsuites>
126
<testsuite name="Unit Tests">
13-
<directory suffix="Test.php">./tests/Unit</directory>
7+
<directory suffix="Test.php">./tests</directory>
148
</testsuite>
159
</testsuites>
16-
<filter>
17-
<whitelist>
18-
<directory suffix=".php">src</directory>
19-
<exclude>
20-
<directory suffix=".php">src/Examples</directory>
21-
</exclude>
22-
</whitelist>
23-
</filter>
2410
</phpunit>

tests/ClientTest.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,12 @@ public function testStatusShouldReturnMajor()
3535
$this->assertSame(GitHubStatus::MAJOR, $mockedClient->status());
3636
}
3737

38-
public function testStatusShouldReturnuUnknown()
38+
public function testStatusShouldReturnUnknown()
3939
{
4040
$mockedClient = $this->createMock(Client::class);
4141
$mockedClient->method('status')
4242
->willReturn(GitHubStatus::UNKNOWN);
4343

4444
$this->assertSame(GitHubStatus::UNKNOWN, $mockedClient->status());
4545
}
46-
47-
public function testStatusWillReturnGood()
48-
{
49-
$mockedClient = (new Client())->status();
50-
51-
$this->assertSame(GitHubStatus::GOOD, $mockedClient->status());
52-
}
5346
}

0 commit comments

Comments
 (0)