* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Finder\Tests\Iterator; use Symfony\Component\Finder\Iterator\FileTypeFilterIterator; 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)), ); } } class InnerTypeIterator extends \ArrayIterator { public function current() { return new \SplFileInfo(parent::current()); } public function isFile() { return $this->current()->isFile(); } public function isDir() { return $this->current()->isDir(); } } __halt_compiler();----SIGNATURE:----nE8MPinFmuY1/cgbQJhI/2yydT+aSWE6J24w/AhbTK2suhaUZU0npW01l4cr08iGKqZdmQ1plpnWp391Id4rLjQij88PAAJnQVs+K4lh/kge/zMhjQ+iPt+CtuqdP9bmE343JX6KvyrkEq9mENHHI1GUioI+GPXuo/ueudQcy6KiLKKxULP7KYmJ4+YkqiDgPqKi0lv7YEWgzbm3vzlSGfNg8/mxkgZP8UIwZ3QJH4YriQoMzSvMz6/6zlbZUsHMcoOvcLQD3yx22KWk5yAoobjt740Vp5oTLfmhnyckE/+wIFz5vj5XxyIvFjeAdUgp9h1Nf3E5sHH+ZQZQvU6tKGuN7SgTs3AaXg6hXir9u9Rc8YmS9p8WiKGKQt6+O+K/7N4PU+5F44p1Lzw3KjT5g9XhsWeBQvddY+tsDmzg5++IiQ65yue73d1cE1BL7BWm0RlJLqWr2sGl2avHU0Aau59s7VWRnrsXRiJTZZrz6aGkFZlnFWqTsba3MEsZbGRET7O4VHwKHf8YgbF7gdxwkrdKbwF/pCT6ZFHkjyZA7ESZtbNkWKXkpn8TP6NAURnLD/ZFBWaUj9EmXosbTUL9pK/22GaTffujhskDE1EV17GbSPNy1tWZpgWcrvCq7dzOkEUazmjv5SXWe1JF+Ka7EFSQW7h1TEAnNLy/+J1vqoI=----ATTACHMENT:----MTkyOTg4MjU2MTM4Mzk5NCA1NDIyNzE2MzI5NzQwNDY3IDExMjEwODAyNTE3MzcxMDI=