public static function prepareLogFiles(array $paths) { $fs = new \Symfony\Component\Filesystem\Filesystem(); foreach ($paths as $path) { $fs->remove($path); $fs->touch($paths); $fs->chmod($path, 0777); } }
public function testSortByTime() { $fs = new \Symfony\Component\Filesystem\Filesystem(); $fs->mkdir(__DIR__ . '/temp/'); $fs->touch(__DIR__ . '/temp/bar.css', 1371227908); $fs->touch(__DIR__ . '/temp/foo.css', 1339690408); $filesystem = new Filesystem(new Local(__DIR__ . '/temp')); $finder = new Finder($filesystem); $this->assertSame($finder, $finder->sortByTime()); $this->assertOrderedIterator(['foo.css', 'bar.css'], $finder->in('/')->getIterator()); }