Skip to content

Commit

Permalink
Make this test portable
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Feb 4, 2024
1 parent 93b9806 commit f01a305
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/unit/Util/FilesystemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\Util;

use const DIRECTORY_SEPARATOR;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\TestCase;
Expand All @@ -22,7 +23,7 @@ public function testCanResolveStreamOrFile(): void
$this->assertSame('php://stdout', Filesystem::resolveStreamOrFile('php://stdout'));
$this->assertSame('socket://hostname:port', Filesystem::resolveStreamOrFile('socket://hostname:port'));
$this->assertSame(__FILE__, Filesystem::resolveStreamOrFile(__FILE__));
$this->assertSame(__DIR__ . '/does-not-exist', Filesystem::resolveStreamOrFile(__DIR__ . '/does-not-exist'));
$this->assertSame(__DIR__ . DIRECTORY_SEPARATOR . 'does-not-exist', Filesystem::resolveStreamOrFile(__DIR__ . '/does-not-exist'));
$this->assertFalse(Filesystem::resolveStreamOrFile(__DIR__ . '/does-not-exist/does-not-exist'));
}
}

0 comments on commit f01a305

Please sign in to comment.