backport GlobTest from 2.7 branch
This commit is contained in:
parent
27de563236
commit
ceaeb43692
|
@ -248,6 +248,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|||
__DIR__.DIRECTORY_SEPARATOR.'BsdFinderTest.php',
|
||||
__DIR__.DIRECTORY_SEPARATOR.'FinderTest.php',
|
||||
__DIR__.DIRECTORY_SEPARATOR.'GnuFinderTest.php',
|
||||
__DIR__.DIRECTORY_SEPARATOR.'GlobTest.php',
|
||||
);
|
||||
|
||||
$this->assertIterator($expected, $iterator);
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* 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 Symfony\Component\Finder\Glob;
|
||||
|
||||
class GlobTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testGlobToRegexDelimiters()
|
||||
{
|
||||
$this->assertEquals('#^(?=[^\.])\#$#', Glob::toRegex('#'));
|
||||
$this->assertEquals('#^\.[^/]*$#', Glob::toRegex('.*'));
|
||||
}
|
||||
}
|
Reference in New Issue