public function FinderTest::testSymlinksNotResolved in Database Sanitize 7
File
- vendor/
symfony/ finder/ Tests/ FinderTest.php, line 59
Class
Namespace
Symfony\Component\Finder\TestsCode
public function testSymlinksNotResolved() {
if ('\\' === \DIRECTORY_SEPARATOR) {
$this
->markTestSkipped('symlinks are not supported on Windows');
}
$finder = $this
->buildFinder();
symlink($this
->toAbsolute('foo'), $this
->toAbsolute('baz'));
$expected = $this
->toAbsolute(array(
'baz/bar.tmp',
));
$in = self::$tmpDir . '/baz/';
try {
$this
->assertIterator($expected, $finder
->in($in)
->files()
->getIterator());
unlink($this
->toAbsolute('baz'));
} catch (\Exception $e) {
unlink($this
->toAbsolute('baz'));
throw $e;
}
}