File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php declare (strict_types=1 );
2
+ /*
3
+ * This file is part of PHPUnit.
4
+ *
5
+ * (c) Sebastian Bergmann <sebastian@phpunit.de>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+ namespace PHPUnit \Util ;
11
+
12
+ use PHPUnit \Framework \Attributes \CoversClass ;
13
+ use PHPUnit \Framework \Attributes \Small ;
14
+ use PHPUnit \Framework \TestCase ;
15
+
16
+ #[CoversClass(Filesystem::class)]
17
+ #[Small]
18
+ final class FilesystemTest extends TestCase
19
+ {
20
+ public function testCanResolvePathOrStream (): void
21
+ {
22
+ $ this ->assertSame ('php://stdout ' , Filesystem::resolvePathOrStream ('php://stdout ' ));
23
+ $ this ->assertSame ('socket://hostname:port ' , Filesystem::resolvePathOrStream ('socket://hostname:port ' ));
24
+ $ this ->assertSame (__FILE__ , Filesystem::resolvePathOrStream (__FILE__ ));
25
+ $ this ->assertFalse (Filesystem::resolvePathOrStream (__DIR__ . '/does-not-exist ' ));
26
+ }
27
+ }
You can’t perform that action at this time.
0 commit comments