Skip to content

Commit 163d2c8

Browse files
committed
Fix testWriteInvalidFile failing on PHP 8
"failed" is "Failed" on PHP 8
1 parent 05cf667 commit 163d2c8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/FileTest.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ public function testReadInvalidFile(): void
3232
public function testWriteInvalidFile(): void
3333
{
3434
$this->expectException(CouldNotWriteFileException::class);
35-
$this->expectExceptionMessage('Could not write file: / (file_put_contents(/): failed to open stream: Is a directory)');
35+
if (PHP_VERSION_ID >= 80000) {
36+
$this->expectExceptionMessage('Could not write file: / (file_put_contents(/): Failed to open stream: Is a directory)');
37+
}
38+
if (PHP_VERSION_ID < 80000) {
39+
$this->expectExceptionMessage('Could not write file: / (file_put_contents(/): failed to open stream: Is a directory)');
40+
}
3641
FileWriter::write('/', '');
3742
}
3843
}

0 commit comments

Comments
 (0)