olinox14 1 год назад
Родитель
Сommit
872187fda4
1 измененных файлов с 12 добавлено и 0 удалено
  1. 12 0
      tests/PathTest.php

+ 12 - 0
tests/PathTest.php

@@ -282,4 +282,16 @@ class PathTest extends TestCase
             $atime
         );
     }
+
+    public function testIsFileOnActualFile(): void
+    {
+        touch(self::TEMP_TEST_DIR . "/foo");
+
+        $this->assertTrue((new Path('foo'))->isFile());
+    }
+
+    public function testIsFileOnNonExistentFile(): void
+    {
+        $this->assertFalse((new Path('foo'))->isFile());
+    }
 }