Small cleanup in Finder tests.

This commit is contained in:
umpirsky 2012-12-12 19:55:22 +01:00
parent 2da97c1a2f
commit 57e70a78d0
3 changed files with 1 additions and 8 deletions

View File

@ -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());
} }
/** /**

View File

@ -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

View File

@ -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;
} }
} }