mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-03 05:29:53 +09:00
Dependency updates and update version number
This commit is contained in:
41
vendor/symfony/finder/Tests/FinderTest.php
vendored
41
vendor/symfony/finder/Tests/FinderTest.php
vendored
@@ -46,6 +46,45 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
||||
$this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py', 'foo bar')), $finder->in(self::$tmpDir)->getIterator());
|
||||
}
|
||||
|
||||
public function testRemoveTrailingSlash()
|
||||
{
|
||||
$finder = $this->buildFinder();
|
||||
|
||||
$expected = $this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py', 'foo bar'));
|
||||
$in = self::$tmpDir.'//';
|
||||
|
||||
$this->assertIterator($expected, $finder->in($in)->files()->getIterator());
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
public function testBackPathNotNormalized()
|
||||
{
|
||||
$finder = $this->buildFinder();
|
||||
|
||||
$expected = $this->toAbsolute(array('foo/../foo/bar.tmp'));
|
||||
$in = self::$tmpDir.'/foo/../foo/';
|
||||
$this->assertIterator($expected, $finder->in($in)->files()->getIterator());
|
||||
}
|
||||
|
||||
public function testDepth()
|
||||
{
|
||||
$finder = $this->buildFinder();
|
||||
@@ -261,7 +300,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
||||
public function testInWithGlob()
|
||||
{
|
||||
$finder = $this->buildFinder();
|
||||
$finder->in(array(__DIR__.'/Fixtures/*/B/C', __DIR__.'/Fixtures/*/*/B/C'))->getIterator();
|
||||
$finder->in(array(__DIR__.'/Fixtures/*/B/C/', __DIR__.'/Fixtures/*/*/B/C/'))->getIterator();
|
||||
|
||||
$this->assertIterator($this->toAbsoluteFixtures(array('A/B/C/abc.dat', 'copy/A/B/C/abc.dat.copy')), $finder);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user