public function testCreateDirectory_NoRights() { $this->expectException(Exception::class); //TODO: find better way to get directory without rights $testDir = 'X:tmp' . gmdate('U') . rand(9999, 99999); \Echron\Tools\FileSystem::createDir($testDir); }
public function testPutContent_NonExistingDir() { $this->expectException(Exception::class); $testFile = 'X:tmp' . DIRECTORY_SEPARATOR . 'tmp' . gmdate('U') . rand(9999, 99999) . 'txt'; $dummyValue = 'Lorem ipsum'; \Echron\Tools\FileSystem::putFileContent($testFile, $dummyValue); $content = file_get_contents($testFile); $this->assertEquals($dummyValue, $content); unlink($testFile); }
public function testIsReadable() { \Echron\Tools\FileSystem::isReadable('tmp'); }