🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-08-10 07:25:03 | PHP 8.2.33
📂
/ (Root)
/
opt
/
alt
/
php53
/
usr
/
share
/
pear
/
test
/
Finder
/
Symfony
/
Component
/
Finder
/
Tests
/
Iterator
📍 /opt/alt/php53/usr/share/pear/test/Finder/Symfony/Component/Finder/Tests/Iterator
🔄 Refresh
✏️
Editing: SizeRangeFilterIteratorTest.php
Read Only
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * 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\SizeRangeFilterIterator; use Symfony\Component\Finder\Comparator\NumberComparator; class SizeRangeFilterIteratorTest extends RealIteratorTestCase { /** * @dataProvider getAcceptData */ public function testAccept($size, $expected) { $inner = new InnerSizeIterator(self::$files); $iterator = new SizeRangeFilterIterator($inner, $size); $this->assertIterator($expected, $iterator); } public function getAcceptData() { $lessThan1KGreaterThan05K = array( '.foo', '.git', 'foo', 'test.php', 'toto', ); return array( array(array(new NumberComparator('< 1K'), new NumberComparator('> 0.5K')), $this->toAbsolute($lessThan1KGreaterThan05K)), ); } } class InnerSizeIterator extends \ArrayIterator { public function current() { return new \SplFileInfo(parent::current()); } public function getFilename() { return parent::current(); } public function isFile() { return $this->current()->isFile(); } public function getSize() { return $this->current()->getSize(); } }
💾 Save Changes
❌ Cancel