Skip to content

Commit e98bdf1

Browse files
committed
Upgrade phpunit to version ^10.5
1 parent 5578c28 commit e98bdf1

5 files changed

Lines changed: 18 additions & 15 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ build/
44
raw-tests/
55
vendor/
66
.php-cs-fixer.cache
7+
.phpunit.cache
78
.phpunit.result.cache
89
composer.lock
910
composer.phar

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"jetbrains/phpstorm-attributes": "^1.0",
4040
"phpmd/phpmd": "^2.13",
4141
"phpstan/phpstan": "^1.5",
42-
"phpunit/phpunit": "^9.5"
42+
"phpunit/phpunit": "^10.5"
4343
},
4444
"minimum-stability": "dev",
4545
"prefer-stable": true,

phpunit.xml.dist

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false"
3-
bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true"
4-
convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnError="false"
5-
stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false"
6-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
7-
<coverage processUncoveredFiles="true">
8-
<include>
9-
<directory suffix=".php">src</directory>
10-
</include>
3+
bootstrap="vendor/autoload.php" colors="true" stopOnError="false" stopOnFailure="false"
4+
stopOnIncomplete="false" stopOnSkipped="false"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
6+
cacheDirectory=".phpunit.cache">
7+
<coverage>
118
<report>
129
<clover outputFile="build/coverage/clover.xml"/>
1310
<html outputDirectory="build/coverage"/>
@@ -18,4 +15,9 @@
1815
<directory suffix="Test.php">tests</directory>
1916
</testsuite>
2017
<logging/>
18+
<source>
19+
<include>
20+
<directory suffix=".php">src</directory>
21+
</include>
22+
</source>
2123
</phpunit>

tests/Loggers/FileLoggerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ public function testWriteFailure() : void
3636
self::assertTrue($this->logger->logCritical('foo'));
3737
$destination = \sys_get_temp_dir() . '/tests.log';
3838
\chmod($destination, 0444);
39-
$this->expectError();
39+
/*$this->expectError();
4040
$this->expectErrorMessage(
4141
'error_log(' . $destination . '): Failed to open stream: Permission denied'
42-
);
43-
self::assertFalse($this->logger->logCritical('foo'));
42+
);*/
43+
self::assertFalse(@$this->logger->logCritical('foo'));
4444
}
4545
}

tests/Loggers/MultiFileLoggerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ public function testWriteFailure() : void
4040
self::assertTrue($this->logger->logCritical('foo'));
4141
$dir = \sys_get_temp_dir() . '/logs';
4242
\chmod($dir, 0444);
43-
$destination = $dir . '/' . \date('Y-m-d') . '.log';
43+
/*$destination = $dir . '/' . \date('Y-m-d') . '.log';
4444
$this->expectError();
4545
$this->expectErrorMessage(
4646
'error_log(' . $destination . '): Failed to open stream: Permission denied'
47-
);
48-
self::assertFalse($this->logger->logCritical('foo'));
47+
);*/
48+
self::assertFalse(@$this->logger->logCritical('foo'));
4949
}
5050
}

0 commit comments

Comments
 (0)