isDir()) rmdir($fileInfo->getRealPath()); else unlink($fileInfo->getRealPath()); } } private static function getTestDirectoryPath() { return __DIR__ . DIRECTORY_SEPARATOR . 'files'; } }