X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fsymfony%2Ffinder%2FTests%2FGlobTest.php;fp=vendor%2Fsymfony%2Ffinder%2FTests%2FGlobTest.php;h=b81151e1e478a5b4f335f8e47daac0acea8f32ea;hp=0000000000000000000000000000000000000000;hb=eba34333e3c89f208d2f72fa91351ad019a71583;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae diff --git a/vendor/symfony/finder/Tests/GlobTest.php b/vendor/symfony/finder/Tests/GlobTest.php new file mode 100644 index 000000000..b81151e1e --- /dev/null +++ b/vendor/symfony/finder/Tests/GlobTest.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Finder\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Finder\Glob; + +class GlobTest extends TestCase +{ + public function testGlobToRegexDelimiters() + { + $this->assertEquals('#^(?=[^\.])\#$#', Glob::toRegex('#')); + $this->assertEquals('#^\.[^/]*$#', Glob::toRegex('.*')); + $this->assertEquals('^\.[^/]*$', Glob::toRegex('.*', true, true, '')); + $this->assertEquals('/^\.[^/]*$/', Glob::toRegex('.*', true, true, '/')); + } +}