Skip to content

Commit c54349d

Browse files
committed
Revert to phpunit 9.x.
1 parent 52eef53 commit c54349d

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"require-dev": {
1414
"phing/phing": "^3.0.1",
15-
"phpunit/phpunit": "^11.5.22"
15+
"phpunit/phpunit": "^9.6.23"
1616
},
1717
"autoload": {
1818
"psr-4": {

phpunit.xml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
4-
displayDetailsOnTestsThatTriggerDeprecations="true"
5-
displayDetailsOnTestsThatTriggerErrors="true"
6-
displayDetailsOnTestsThatTriggerNotices="true"
7-
displayDetailsOnTestsThatTriggerWarnings="true"
8-
displayDetailsOnPhpunitDeprecations="true">
1+
<?xml version="1.0"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="test/bootstrap.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3+
<coverage processUncoveredFiles="true">
4+
<include>
5+
<directory suffix=".php">src</directory>
6+
</include>
7+
<report>
8+
<clover outputFile="test/coverage.xml"/>
9+
<html outputDirectory="test/report"/>
10+
</report>
11+
</coverage>
912
<testsuites>
10-
<testsuite name="default">
13+
<testsuite name="Tests">
1114
<directory>test</directory>
1215
</testsuite>
1316
</testsuites>
14-
15-
<source ignoreIndirectDeprecations="true" restrictNotices="true" restrictWarnings="true">
16-
<include>
17-
<directory>src</directory>
18-
</include>
19-
</source>
17+
<logging/>
18+
<php>
19+
<const name="PHPUNIT_ERROR_HANDLER_TEST_SUITE" value="true"/>
20+
</php>
2021
</phpunit>

src/ErrorHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ErrorHandler
2828
public function handleError(int $errno, string $errstr, ?string $errfile, ?int $errline): bool
2929
{
3030
// See https://www.php.net/manual/en/language.operators.errorcontrol.php for the bitwise or expression.
31-
if (error_reporting()===(E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | E_PARSE))
31+
if (error_reporting()===( E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR | E_PARSE))
3232
{
3333
// The error was suppressed with the @-operator. Don't throw an exception.
3434
return false;

test/ErrorHandlerTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,8 @@ public function testWarning(): void
101101
//--------------------------------------------------------------------------------------------------------------------
102102
/**
103103
* Test when __toString fails.
104-
*
105-
* The test gives us some problems with PhpUnit 11.
106104
*/
107-
public function xtestToString1(): void
105+
public function testToString1(): void
108106
{
109107
$tmp = (string)$this;
110108
self::assertSame('__toString', $tmp);

0 commit comments

Comments
 (0)