| Conditions | 1 |
| Paths | 1 |
| Total Lines | 22 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class FilesystemTest extends TestSuite |
||
| 8 | { |
||
| 9 | public function test() |
||
| 10 | { |
||
| 11 | $filesystem = $this->app->get(Filesystem::class); |
||
| 12 | |||
| 13 | $this->assertSame($filesystem->getPath(), __DIR__.DIRECTORY_SEPARATOR.'example'); |
||
| 14 | $this->assertSame($filesystem->getPath(''), __DIR__.DIRECTORY_SEPARATOR.'example'); |
||
| 15 | |||
| 16 | $this->assertSame($filesystem->getPath('config'), implode(DIRECTORY_SEPARATOR, [__DIR__, 'example', 'config'])); |
||
| 17 | |||
| 18 | $this->assertSame( |
||
| 19 | $filesystem->getPath('config', 'administrator.php'), |
||
| 20 | implode(DIRECTORY_SEPARATOR, [__DIR__, 'example', 'config', 'administrator.php']) |
||
| 21 | ); |
||
| 22 | |||
| 23 | $this->assertSame( |
||
| 24 | $filesystem->getPath('config'.DIRECTORY_SEPARATOR.'administrator.php'), |
||
| 25 | implode(DIRECTORY_SEPARATOR, [__DIR__, 'example', 'config', 'administrator.php']) |
||
| 26 | ); |
||
| 27 | |||
| 28 | $this->assertTrue($filesystem->exists('php', 'BusinessLogic.php')); |
||
| 29 | $this->assertFalse($filesystem->exists('php', 'InvalidLogic.php')); |
||
| 32 |