IteratorTestCase.php 688 B

123456789101112131415161718192021222324
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Tests\Components\Finder\Iterator;
  11. require_once __DIR__.'/Iterator.php';
  12. class IteratorTestCase extends \PHPUnit_Framework_TestCase
  13. {
  14. protected function assertIterator($expected, \Iterator $iterator)
  15. {
  16. $values = array_map(function (\SplFileInfo $fileinfo) { return $fileinfo->getPathname(); }, iterator_to_array($iterator));
  17. $this->assertEquals($expected, array_values($values));
  18. }
  19. }