4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Finder\Tests;
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\Finder\Glob;
17 class GlobTest extends TestCase
19 public function testGlobToRegexDelimiters()
21 $this->assertEquals('#^(?=[^\.])\#$#', Glob::toRegex('#'));
22 $this->assertEquals('#^\.[^/]*$#', Glob::toRegex('.*'));
23 $this->assertEquals('^\.[^/]*$', Glob::toRegex('.*', true, true, ''));
24 $this->assertEquals('/^\.[^/]*$/', Glob::toRegex('.*', true, true, '/'));