* * 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:----NU0o9MmiFbpc+OGQw7fVBva6sPYPquyYHPd7OTFqS66mAH72ltR++ggtzN+7JHO1zSu13BH+VORRvX3bxFBRAt+5kovWCqPp2gM5yxhDaRvl0mhTW2dR9ME4RoqqwcKmHHgqCxb1S18UG3MnyHgtT4qNRLfXYPS1aFtnkc8GZpEEB+XjVVTNQFP3gCtr21PSAX+xg3Jk3ESoCry6uxwn2iqZfdpDE1tvBeeNpGQwR0Kk97AxZejvQTgjPOm+HlA3HUdp3vDd8Sv6egjtlUOy8uQIc7QmMi0i/uE4eig0IDpk8zy7kXkVBUKurZmUxxyezCHaJvshuv0jYEd756k47NAehV9GOtiWCtgKEUvUv2ApjRO4lN423GMMX+nF7YfJfJib8nr6P0QbhMRbN09teQG0uUY5om9LGkbEAf/xK9eAPaBSdo16NfNPVU+OO/qkYuf2Sth6y9qIbWrchdp/hk1RsJgs7qxUW+Lod87Ne2xQD191X1dAEzW+AVmvWEpJIwN2cID/cXug90mwb2L+PPfof6kViEw1HR8UU27RvcjG56/SSflSdS1zt++/wWqF7IEu+BGsbh7EuBiiHdHvRkCLgW/yl8d+Bk+ur60JdufIh2gWOirhh4Cc1nMYy4iEnARJSTA4yALN1UbcPexRFShlP6SbmZ+Xx9bybjQmGTU=----ATTACHMENT:----NzI5ODYyMTcyNTk3NjQzMSA1Mzk4MDk3MjI3MzA2MDggMjM4NzYzMzE3NDQ0MTA4OA==