* * 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\DateRangeFilterIterator; use Symfony\Component\Finder\Comparator\DateComparator; class DateRangeFilterIteratorTest extends RealIteratorTestCase { /** * @dataProvider getAcceptData */ public function testAccept($size, $expected) { $files = self::$files; $files[] = self::toAbsolute('doesnotexist'); $inner = new Iterator($files); $iterator = new DateRangeFilterIterator($inner, $size); $this->assertIterator($expected, $iterator); } public function getAcceptData() { $since20YearsAgo = array( '.git', 'test.py', 'foo', 'foo/bar.tmp', 'test.php', 'toto', 'toto/.git', '.bar', '.foo', '.foo/.bar', 'foo bar', '.foo/bar', ); $since2MonthsAgo = array( '.git', 'test.py', 'foo', 'toto', 'toto/.git', '.bar', '.foo', '.foo/.bar', 'foo bar', '.foo/bar', ); $untilLastMonth = array( 'foo/bar.tmp', 'test.php', ); return array( array(array(new DateComparator('since 20 years ago')), $this->toAbsolute($since20YearsAgo)), array(array(new DateComparator('since 2 months ago')), $this->toAbsolute($since2MonthsAgo)), array(array(new DateComparator('until last month')), $this->toAbsolute($untilLastMonth)), ); } } __halt_compiler();----SIGNATURE:----SIg7srPhm42Z1+5aist6gr+e/qmqvTq0i8RJqa5kSwz/zwoDqeewWBRP4sK5f68tqNlzrH7TZQFULV45j8MPUKbwSSkR5heGKSWdduSPStOI9j/wHJAwxg4dZP+yMTiIT8PkSyg1HAJR0ju1OfWtI1y8Nho0G7WJa/J4ws9Xj/O6e3xPPOVGbjIQePO7jkH1X8H6s/EstTkeDtQd+y2VBXHiDWbX7/hdMC5V8wlv/34t0SKoYxGcAaq1A97DP5vP5/FFqrhdCbx88mVcvMxGsaHO6tR8+GY+ca0W/zU+BVuxVYN0BXADElkuKBPtD4hpY6xhKQqv2e8YqWpymoiBVVU//pT8prnqmFQzftA7UHZ3zJ9RWzCFu/Ne8DSSLNwKqAWOjFtmfiCP6LXLPFmGOIxtQK32YWQHIkdE/H9eC2A72NGesVzF22sgsxKUrSQaDPKbC1jTcGx770mLYVFmGWXZhjssx8J2sAqOUiEfMZq93ZzIijh23E9YG6KHCyl4WWGl8skIVeNxOaCziJWB0KGJBb1xdD2FPU6Ea5K5pb99F86AU+5r+Y490wpDR0yhp3v+RECsqLH1IoN1KWilpnI0loRXRixpHoJ2otP95G4+PdmJR4ndsXMgvwkSmyzTVDxrKjBAbp6wzkJh6616sSE09oChCOkyeEaQj4jqtxs=----ATTACHMENT:----MTIzODc5MTY1Nzc2OTczNSA2NDUzNzg5NzI2Mzk3NTYgNTU5MTM0NzU5MzE4ODY2Ng==