class FileTypeFilterIteratorTest in Database Sanitize 7
Hierarchy
- class \Symfony\Component\Finder\Tests\Iterator\IteratorTestCase extends \PHPUnit\Framework\TestCase
- class \Symfony\Component\Finder\Tests\Iterator\RealIteratorTestCase
- class \Symfony\Component\Finder\Tests\Iterator\FileTypeFilterIteratorTest
- class \Symfony\Component\Finder\Tests\Iterator\RealIteratorTestCase
Expanded class hierarchy of FileTypeFilterIteratorTest
File
- vendor/
symfony/ finder/ Tests/ Iterator/ FileTypeFilterIteratorTest.php, line 16
Namespace
Symfony\Component\Finder\Tests\IteratorView source
class FileTypeFilterIteratorTest extends RealIteratorTestCase {
/**
* @dataProvider getAcceptData
*/
public function testAccept($mode, $expected) {
$inner = new InnerTypeIterator(self::$files);
$iterator = new FileTypeFilterIterator($inner, $mode);
$this
->assertIterator($expected, $iterator);
}
public function getAcceptData() {
$onlyFiles = array(
'test.py',
'foo/bar.tmp',
'test.php',
'.bar',
'.foo/.bar',
'.foo/bar',
'foo bar',
);
$onlyDirectories = array(
'.git',
'foo',
'toto',
'toto/.git',
'.foo',
);
return array(
array(
FileTypeFilterIterator::ONLY_FILES,
$this
->toAbsolute($onlyFiles),
),
array(
FileTypeFilterIterator::ONLY_DIRECTORIES,
$this
->toAbsolute($onlyDirectories),
),
);
}
}Members
|
Name |
Modifiers | Type | Description | Overrides |
|---|---|---|---|---|
|
FileTypeFilterIteratorTest:: |
public | function | ||
|
FileTypeFilterIteratorTest:: |
public | function | @dataProvider getAcceptData | |
|
IteratorTestCase:: |
protected | function | ||
|
IteratorTestCase:: |
protected | function | Same as IteratorTestCase::assertIterator with foreach usage. | |
|
IteratorTestCase:: |
protected | function | ||
|
IteratorTestCase:: |
protected | function | Same as assertOrderedIterator, but checks the order of groups of array elements. | |
|
IteratorTestCase:: |
protected | function | Same as IteratorTestCase::assertOrderedIterator with foreach usage. | |
|
RealIteratorTestCase:: |
protected static | property | ||
|
RealIteratorTestCase:: |
protected static | property | ||
|
RealIteratorTestCase:: |
public static | function | ||
|
RealIteratorTestCase:: |
public static | function | ||
|
RealIteratorTestCase:: |
protected static | function | ||
|
RealIteratorTestCase:: |
protected static | function |