* * 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 PHPUnit\Framework\TestCase; use Symfony\Component\Finder\Iterator\MultiplePcreFilterIterator; class MultiplePcreFilterIteratorTest extends TestCase { /** * @dataProvider getIsRegexFixtures */ public function testIsRegex($string, $isRegex, $message) { $testIterator = new TestMultiplePcreFilterIterator(); $this->assertEquals($isRegex, $testIterator->isRegex($string), $message); } public function getIsRegexFixtures() { return array( array('foo', false, 'string'), array(' foo ', false, '" " is not a valid delimiter'), array('\\foo\\', false, '"\\" is not a valid delimiter'), array('afooa', false, '"a" is not a valid delimiter'), array('//', false, 'the pattern should contain at least 1 character'), array('/a/', true, 'valid regex'), array('/foo/', true, 'valid regex'), array('/foo/i', true, 'valid regex with a single modifier'), array('/foo/imsxu', true, 'valid regex with multiple modifiers'), array('#foo#', true, '"#" is a valid delimiter'), array('{foo}', true, '"{,}" is a valid delimiter pair'), array('[foo]', true, '"[,]" is a valid delimiter pair'), array('(foo)', true, '"(,)" is a valid delimiter pair'), array('', true, '"<,>" is a valid delimiter pair'), array('*foo.*', false, '"*" is not considered as a valid delimiter'), array('?foo.?', false, '"?" is not considered as a valid delimiter'), ); } } class TestMultiplePcreFilterIterator extends MultiplePcreFilterIterator { public function __construct() { } public function accept() { throw new \BadFunctionCallException('Not implemented'); } public function isRegex($str) { return parent::isRegex($str); } public function toRegex($str) { throw new \BadFunctionCallException('Not implemented'); } } __halt_compiler();----SIGNATURE:----Lffrx5QqNQFYF7cgbQi5rhk/vXd6uGZ39OwoIftuFxHAW2sLBnFxHv7brPmmCv+bgLQHcOTGk4SwCRARyBvj6mrzxI1bKnZwwMLoO1yqeHsd63AFUn2REGRMCsSbv374MaJ5lDMB7uGXb1mqOep1FOmYC54zrWY5qkTtlbyfSeM54P1cK4s6DdT3WZuzcBUFmmvBLkVLtq5KxaAQ5uFrRmHwG8OPN1tUFJ+nQzMw0l77RoVnXRELfLpGFsLxcVWNEUuWB+9TaxkNip/J2cjdXXMI4cXhzRvmRLJZvUg2tNmYRAEQdm2Tc/FD2KBPfoo5U5VyqugBHdx97vn6pN0MPDcSmJ/D/pm68+nXgCmGmxV1653LY0JzwiLYlwkGaR0caOCXaw+aCVcwt7B/eprt8tppgoRuxNV2AbK8Jch+ZPI4uEWuiodTUPJYEmTM33w0p5yzzMWoRZs4yq8/UCXLj6oh76MA8qXxv2UgBYkzS+UsJww6TQQQ5MTNiIKfJCvwnfsB8/7oHl9Wile1na5Cg6TYYn6wPQyZl0VqIrqGD2Z8FcSFlPLYHhVBu0eeS+UGIiJ+SexxNODjdETBvbRpLvVpldGeTAHNu5B8W3K6c7fU+dljJlvS9t3NzMb9s9PRYpITlzZwfpq4J3yB/nxkWZDtLK/yH/RJWolQOcVIE/4=----ATTACHMENT:----NDY4MDMzMzcxMTA5ODA1OCA3NjUwNTEzOTU2MTI3MTIwIDQ3NTgyMDU2OTUzNDY3MTQ=