minor #34976 Fix regex lookahead syntax in ApplicationTest (guilliamxavier)
This PR was merged into the 3.4 branch.
Discussion
----------
Fix regex lookahead syntax in ApplicationTest
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no (test fix)
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
`(?>!1)` is actually an atomic group for literal `!1`.
`(?!1)` is a negative lookahead assertion for literal `1`.
Commits
-------
cf1d7b2ed1
Fix regex lookahead syntax in ApplicationTest
This commit is contained in:
commit
28bf18089a
@ -558,7 +558,7 @@ class ApplicationTest extends TestCase
|
||||
$this->assertRegExp(sprintf('/Command "%s" is not defined./', $commandName), $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternatives');
|
||||
$this->assertRegExp('/afoobar1/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternative : "afoobar1"');
|
||||
$this->assertRegExp('/foo:bar1/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternative : "foo:bar1"');
|
||||
$this->assertNotRegExp('/foo:bar(?>!1)/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, without "foo:bar" alternative');
|
||||
$this->assertNotRegExp('/foo:bar(?!1)/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, without "foo:bar" alternative');
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user