Small cleanup in Finder tests.
This commit is contained in:
parent
2da97c1a2f
commit
57e70a78d0
@ -26,10 +26,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|||||||
self::$tmpDir = sys_get_temp_dir().'/symfony2_finder';
|
self::$tmpDir = sys_get_temp_dir().'/symfony2_finder';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public function testCreate()
|
||||||
* @dataProvider getAdaptersTestData
|
|
||||||
*/
|
|
||||||
public function testCreate($adapter)
|
|
||||||
{
|
{
|
||||||
$this->assertInstanceOf('Symfony\Component\Finder\Finder', Finder::create());
|
$this->assertInstanceOf('Symfony\Component\Finder\Finder', Finder::create());
|
||||||
}
|
}
|
||||||
@ -209,7 +206,6 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|||||||
$finder = $this->buildFinder($adapter);
|
$finder = $this->buildFinder($adapter);
|
||||||
$this->assertSame($finder, $finder->ignoreDotFiles(true)->ignoreVCS(false));
|
$this->assertSame($finder, $finder->ignoreDotFiles(true)->ignoreVCS(false));
|
||||||
$this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator());
|
$this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto', 'foo bar')), $finder->in(self::$tmpDir)->getIterator());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38,7 +38,6 @@ class FilenameFilterIteratorTest extends IteratorTestCase
|
|||||||
array(array(), array('/\.php$/'), array('test.py')),
|
array(array(), array('/\.php$/'), array('test.py')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class InnerNameIterator extends \ArrayIterator
|
class InnerNameIterator extends \ArrayIterator
|
||||||
|
@ -28,7 +28,6 @@ class MockSplFileInfo extends \SplFileInfo
|
|||||||
if (is_string($param)) {
|
if (is_string($param)) {
|
||||||
parent::__construct($param);
|
parent::__construct($param);
|
||||||
} elseif (is_array($param)) {
|
} elseif (is_array($param)) {
|
||||||
|
|
||||||
$defaults = array(
|
$defaults = array(
|
||||||
'name' => 'file.txt',
|
'name' => 'file.txt',
|
||||||
'contents' => null,
|
'contents' => null,
|
||||||
@ -132,5 +131,4 @@ class MockSplFileInfo extends \SplFileInfo
|
|||||||
{
|
{
|
||||||
return $this->relativePathname;
|
return $this->relativePathname;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user