minor #15144 [Finder] Fix PHPUnit param order (Dave Hulbert)
This PR was merged into the 2.7 branch.
Discussion
----------
[Finder] Fix PHPUnit param order
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Fairly cosmetic but it confused me for a while when I broke tests and PHPUnit said something like
--- Expected
+++ Actual
@@ @@
-'/^(?=[^\.])x\.[^/]*$/'
+'/^\.[^/]*$/'
Looks like 2.7 is the earliest this can be merged into.
Commits
-------
8e41a5b
Fix param order of assertEquals (expected, actual) in test for Finder\Glob
This commit is contained in:
commit
c8e999b198
@ -15,11 +15,10 @@ use Symfony\Component\Finder\Glob;
|
|||||||
|
|
||||||
class GlobTest extends \PHPUnit_Framework_TestCase
|
class GlobTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
public function testGlobToRegexDelimiters()
|
public function testGlobToRegexDelimiters()
|
||||||
{
|
{
|
||||||
$this->assertEquals(Glob::toRegex('.*'), '#^\.[^/]*$#');
|
$this->assertEquals('#^\.[^/]*$#', Glob::toRegex('.*'));
|
||||||
$this->assertEquals(Glob::toRegex('.*', true, true, ''), '^\.[^/]*$');
|
$this->assertEquals('^\.[^/]*$', Glob::toRegex('.*', true, true, ''));
|
||||||
$this->assertEquals(Glob::toRegex('.*', true, true, '/'), '/^\.[^/]*$/');
|
$this->assertEquals('/^\.[^/]*$/', Glob::toRegex('.*', true, true, '/'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user