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:
Tobias Schultze 2015-06-30 00:30:04 +02:00
commit c8e999b198
1 changed files with 3 additions and 4 deletions

View File

@ -15,11 +15,10 @@ use Symfony\Component\Finder\Glob;
class GlobTest extends \PHPUnit_Framework_TestCase
{
public function testGlobToRegexDelimiters()
{
$this->assertEquals(Glob::toRegex('.*'), '#^\.[^/]*$#');
$this->assertEquals(Glob::toRegex('.*', true, true, ''), '^\.[^/]*$');
$this->assertEquals(Glob::toRegex('.*', true, true, '/'), '/^\.[^/]*$/');
$this->assertEquals('#^\.[^/]*$#', Glob::toRegex('.*'));
$this->assertEquals('^\.[^/]*$', Glob::toRegex('.*', true, true, ''));
$this->assertEquals('/^\.[^/]*$/', Glob::toRegex('.*', true, true, '/'));
}
}