| @@ 26-34 (lines=9) @@ | ||
| 23 | $this->assertSame($backslashPath, $this->fileSystem->normalizePath($backslashPath)); |
|
| 24 | } |
|
| 25 | ||
| 26 | public function testForceDir(): void |
|
| 27 | { |
|
| 28 | $filePath = TEMP_DIR . '/some/dir/file.txt'; |
|
| 29 | $dirPath = dirname($filePath); |
|
| 30 | $this->assertFalse(file_exists($dirPath)); |
|
| 31 | ||
| 32 | $this->fileSystem->forceDir($filePath); |
|
| 33 | $this->assertTrue(file_exists($dirPath)); |
|
| 34 | } |
|
| 35 | ||
| 36 | public function testDeleteDir(): void |
|
| 37 | { |
|
| @@ 36-44 (lines=9) @@ | ||
| 33 | $this->assertTrue(file_exists($dirPath)); |
|
| 34 | } |
|
| 35 | ||
| 36 | public function testDeleteDir(): void |
|
| 37 | { |
|
| 38 | $dir = TEMP_DIR . '/new-dir'; |
|
| 39 | mkdir($dir); |
|
| 40 | $this->assertTrue(file_exists($dir)); |
|
| 41 | ||
| 42 | $this->fileSystem->deleteDir($dir); |
|
| 43 | $this->assertFalse(file_exists($dir)); |
|
| 44 | } |
|
| 45 | ||
| 46 | public function testPurgeDir(): void |
|
| 47 | { |
|
| @@ 63-70 (lines=8) @@ | ||
| 60 | $this->assertFalse(file_exists($dir)); |
|
| 61 | } |
|
| 62 | ||
| 63 | public function testPurgeDirOnNonExistingDir(): void |
|
| 64 | { |
|
| 65 | $dir = TEMP_DIR . '/not-created-dir'; |
|
| 66 | $this->assertFalse(file_exists($dir)); |
|
| 67 | ||
| 68 | $this->fileSystem->purgeDir($dir); |
|
| 69 | $this->assertTrue(file_exists($dir)); |
|
| 70 | } |
|
| 71 | ||
| 72 | public function testGetAbsolutePath(): void |
|
| 73 | { |
|