Skip to content

Commit 4fe069f

Browse files
author
Sven Hagemann
committed
Update PHPUnit to version 9
In order to prepare PHP8 compatibility we should use the recent version of PHPUnit
1 parent 3108ccd commit 4fe069f

File tree

4 files changed

+26
-34
lines changed

4 files changed

+26
-34
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"kub-at/php-simple-html-dom-parser": "^1.7"
2525
},
2626
"require-dev": {
27-
"phpunit/phpunit": "~5.0",
27+
"phpunit/phpunit": "~9.0",
2828
"doctrine/cache": "~1.0"
2929
},
3030
"suggest": {

phpunit.xml.dist

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,22 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
4-
colors="true"
5-
convertErrorsToExceptions="true"
6-
convertNoticesToExceptions="true"
7-
convertWarningsToExceptions="true"
8-
processIsolation="false"
9-
stopOnFailure="false"
10-
syntaxCheck="false"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false"
3+
colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true"
4+
convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false"
115
bootstrap="./tests/Caxy/Tests/TestInit.php"
12-
>
13-
14-
<groups>
15-
<exclude>
16-
<group>performance</group>
17-
</exclude>
18-
</groups>
19-
20-
<testsuites>
21-
<testsuite name="php-htmldiff Test Suite">
22-
<directory>./tests/Caxy/Tests/HtmlDiff</directory>
23-
</testsuite>
24-
</testsuites>
25-
26-
<filter>
27-
<whitelist processUncoveredFilesFromWhitelist="true">
28-
<directory suffix=".php">./lib</directory>
29-
</whitelist>
30-
</filter>
31-
6+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
7+
<coverage processUncoveredFiles="true">
8+
<include>
9+
<directory suffix=".php">./lib</directory>
10+
</include>
11+
</coverage>
12+
<groups>
13+
<exclude>
14+
<group>performance</group>
15+
</exclude>
16+
</groups>
17+
<testsuites>
18+
<testsuite name="php-htmldiff Test Suite">
19+
<directory>./tests/Caxy/Tests/HtmlDiff</directory>
20+
</testsuite>
21+
</testsuites>
3222
</phpunit>

tests/Caxy/Tests/AbstractTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
namespace Caxy\Tests;
44

5-
abstract class AbstractTest extends \PHPUnit_Framework_TestCase
5+
use PHPUnit\Framework\TestCase;
6+
7+
abstract class AbstractTest extends TestCase
68
{
79
protected function stripExtraWhitespaceAndNewLines($text)
810
{
@@ -14,4 +16,4 @@ protected function stripExtraWhitespaceAndNewLines($text)
1416
)
1517
);
1618
}
17-
}
19+
}

tests/Caxy/Tests/HtmlDiff/Functional/HTMLPurifierConfigTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class HTMLPurifierConfigTest extends AbstractTest
1313
*/
1414
protected $config;
1515

16-
public function setUp()
16+
public function setUp() : void
1717
{
1818
$config = \HTMLPurifier_Config::createDefault();
1919

@@ -73,4 +73,4 @@ public function testHtmlDiffConfigStatic()
7373
$diff->setHTMLPurifierConfig($this->config);
7474
$diff->build();
7575
}
76-
}
76+
}

0 commit comments

Comments
 (0)