Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions tests/FileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ public function testOpenNonExistentFileIncludesSystemError(): void
new File('nonexistent-file-123', 'r');
self::fail('Expected StreamException to be thrown');
} catch (StreamException $e) {
// Verify the exception message includes both the file path and system error
self::assertStringContainsString('Failed to open file nonexistent-file-123:', $e->getMessage());
self::assertStringContainsString('No such file or directory', $e->getMessage());
// Verify the exception message includes the file path and system error information
self::assertMatchesRegularExpression('/Failed to open file nonexistent-file-123: .+/', $e->getMessage());
}
}

Expand Down