This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/tests/Symfony/Tests/Components/Finder/Iterator/IteratorTestCase.php

25 lines
688 B
PHP
Raw Normal View History

2010-04-21 08:31:18 +01:00
<?php
/*
2010-04-25 16:06:54 +01:00
* This file is part of the Symfony package.
2010-04-21 08:31:18 +01:00
*
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Tests\Components\Finder\Iterator;
require_once __DIR__.'/Iterator.php';
class IteratorTestCase extends \PHPUnit_Framework_TestCase
{
protected function assertIterator($expected, \Iterator $iterator)
{
$values = array_map(function (\SplFileInfo $fileinfo) { return $fileinfo->getPathname(); }, iterator_to_array($iterator));
2010-04-21 08:31:18 +01:00
$this->assertEquals($expected, array_values($values));
}
2010-04-21 08:31:18 +01:00
}