updated packages
This commit is contained in:
408
vendor/symfony/routing/Tests/RouteCompilerTest.php
vendored
408
vendor/symfony/routing/Tests/RouteCompilerTest.php
vendored
@@ -34,153 +34,153 @@ class RouteCompilerTest extends TestCase
|
||||
|
||||
public function provideCompileData()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
return [
|
||||
[
|
||||
'Static route',
|
||||
array('/foo'),
|
||||
'/foo', '#^/foo$#sD', array(), array(
|
||||
array('text', '/foo'),
|
||||
),
|
||||
),
|
||||
['/foo'],
|
||||
'/foo', '#^/foo$#sD', [], [
|
||||
['text', '/foo'],
|
||||
],
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'Route with a variable',
|
||||
array('/foo/{bar}'),
|
||||
'/foo', '#^/foo/(?P<bar>[^/]++)$#sD', array('bar'), array(
|
||||
array('variable', '/', '[^/]++', 'bar'),
|
||||
array('text', '/foo'),
|
||||
),
|
||||
),
|
||||
['/foo/{bar}'],
|
||||
'/foo', '#^/foo/(?P<bar>[^/]++)$#sD', ['bar'], [
|
||||
['variable', '/', '[^/]++', 'bar'],
|
||||
['text', '/foo'],
|
||||
],
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'Route with a variable that has a default value',
|
||||
array('/foo/{bar}', array('bar' => 'bar')),
|
||||
'/foo', '#^/foo(?:/(?P<bar>[^/]++))?$#sD', array('bar'), array(
|
||||
array('variable', '/', '[^/]++', 'bar'),
|
||||
array('text', '/foo'),
|
||||
),
|
||||
),
|
||||
['/foo/{bar}', ['bar' => 'bar']],
|
||||
'/foo', '#^/foo(?:/(?P<bar>[^/]++))?$#sD', ['bar'], [
|
||||
['variable', '/', '[^/]++', 'bar'],
|
||||
['text', '/foo'],
|
||||
],
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'Route with several variables',
|
||||
array('/foo/{bar}/{foobar}'),
|
||||
'/foo', '#^/foo/(?P<bar>[^/]++)/(?P<foobar>[^/]++)$#sD', array('bar', 'foobar'), array(
|
||||
array('variable', '/', '[^/]++', 'foobar'),
|
||||
array('variable', '/', '[^/]++', 'bar'),
|
||||
array('text', '/foo'),
|
||||
),
|
||||
),
|
||||
['/foo/{bar}/{foobar}'],
|
||||
'/foo', '#^/foo/(?P<bar>[^/]++)/(?P<foobar>[^/]++)$#sD', ['bar', 'foobar'], [
|
||||
['variable', '/', '[^/]++', 'foobar'],
|
||||
['variable', '/', '[^/]++', 'bar'],
|
||||
['text', '/foo'],
|
||||
],
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'Route with several variables that have default values',
|
||||
array('/foo/{bar}/{foobar}', array('bar' => 'bar', 'foobar' => '')),
|
||||
'/foo', '#^/foo(?:/(?P<bar>[^/]++)(?:/(?P<foobar>[^/]++))?)?$#sD', array('bar', 'foobar'), array(
|
||||
array('variable', '/', '[^/]++', 'foobar'),
|
||||
array('variable', '/', '[^/]++', 'bar'),
|
||||
array('text', '/foo'),
|
||||
),
|
||||
),
|
||||
['/foo/{bar}/{foobar}', ['bar' => 'bar', 'foobar' => '']],
|
||||
'/foo', '#^/foo(?:/(?P<bar>[^/]++)(?:/(?P<foobar>[^/]++))?)?$#sD', ['bar', 'foobar'], [
|
||||
['variable', '/', '[^/]++', 'foobar'],
|
||||
['variable', '/', '[^/]++', 'bar'],
|
||||
['text', '/foo'],
|
||||
],
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'Route with several variables but some of them have no default values',
|
||||
array('/foo/{bar}/{foobar}', array('bar' => 'bar')),
|
||||
'/foo', '#^/foo/(?P<bar>[^/]++)/(?P<foobar>[^/]++)$#sD', array('bar', 'foobar'), array(
|
||||
array('variable', '/', '[^/]++', 'foobar'),
|
||||
array('variable', '/', '[^/]++', 'bar'),
|
||||
array('text', '/foo'),
|
||||
),
|
||||
),
|
||||
['/foo/{bar}/{foobar}', ['bar' => 'bar']],
|
||||
'/foo', '#^/foo/(?P<bar>[^/]++)/(?P<foobar>[^/]++)$#sD', ['bar', 'foobar'], [
|
||||
['variable', '/', '[^/]++', 'foobar'],
|
||||
['variable', '/', '[^/]++', 'bar'],
|
||||
['text', '/foo'],
|
||||
],
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'Route with an optional variable as the first segment',
|
||||
array('/{bar}', array('bar' => 'bar')),
|
||||
'', '#^/(?P<bar>[^/]++)?$#sD', array('bar'), array(
|
||||
array('variable', '/', '[^/]++', 'bar'),
|
||||
),
|
||||
),
|
||||
['/{bar}', ['bar' => 'bar']],
|
||||
'', '#^/(?P<bar>[^/]++)?$#sD', ['bar'], [
|
||||
['variable', '/', '[^/]++', 'bar'],
|
||||
],
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'Route with a requirement of 0',
|
||||
array('/{bar}', array('bar' => null), array('bar' => '0')),
|
||||
'', '#^/(?P<bar>0)?$#sD', array('bar'), array(
|
||||
array('variable', '/', '0', 'bar'),
|
||||
),
|
||||
),
|
||||
['/{bar}', ['bar' => null], ['bar' => '0']],
|
||||
'', '#^/(?P<bar>0)?$#sD', ['bar'], [
|
||||
['variable', '/', '0', 'bar'],
|
||||
],
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'Route with an optional variable as the first segment with requirements',
|
||||
array('/{bar}', array('bar' => 'bar'), array('bar' => '(foo|bar)')),
|
||||
'', '#^/(?P<bar>(?:foo|bar))?$#sD', array('bar'), array(
|
||||
array('variable', '/', '(?:foo|bar)', 'bar'),
|
||||
),
|
||||
),
|
||||
['/{bar}', ['bar' => 'bar'], ['bar' => '(foo|bar)']],
|
||||
'', '#^/(?P<bar>(?:foo|bar))?$#sD', ['bar'], [
|
||||
['variable', '/', '(?:foo|bar)', 'bar'],
|
||||
],
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'Route with only optional variables',
|
||||
array('/{foo}/{bar}', array('foo' => 'foo', 'bar' => 'bar')),
|
||||
'', '#^/(?P<foo>[^/]++)?(?:/(?P<bar>[^/]++))?$#sD', array('foo', 'bar'), array(
|
||||
array('variable', '/', '[^/]++', 'bar'),
|
||||
array('variable', '/', '[^/]++', 'foo'),
|
||||
),
|
||||
),
|
||||
['/{foo}/{bar}', ['foo' => 'foo', 'bar' => 'bar']],
|
||||
'', '#^/(?P<foo>[^/]++)?(?:/(?P<bar>[^/]++))?$#sD', ['foo', 'bar'], [
|
||||
['variable', '/', '[^/]++', 'bar'],
|
||||
['variable', '/', '[^/]++', 'foo'],
|
||||
],
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'Route with a variable in last position',
|
||||
array('/foo-{bar}'),
|
||||
'/foo-', '#^/foo\-(?P<bar>[^/]++)$#sD', array('bar'), array(
|
||||
array('variable', '-', '[^/]++', 'bar'),
|
||||
array('text', '/foo'),
|
||||
),
|
||||
),
|
||||
['/foo-{bar}'],
|
||||
'/foo-', '#^/foo\-(?P<bar>[^/]++)$#sD', ['bar'], [
|
||||
['variable', '-', '[^/]++', 'bar'],
|
||||
['text', '/foo'],
|
||||
],
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'Route with nested placeholders',
|
||||
array('/{static{var}static}'),
|
||||
'/{static', '#^/\{static(?P<var>[^/]+)static\}$#sD', array('var'), array(
|
||||
array('text', 'static}'),
|
||||
array('variable', '', '[^/]+', 'var'),
|
||||
array('text', '/{static'),
|
||||
),
|
||||
),
|
||||
['/{static{var}static}'],
|
||||
'/{static', '#^/\{static(?P<var>[^/]+)static\}$#sD', ['var'], [
|
||||
['text', 'static}'],
|
||||
['variable', '', '[^/]+', 'var'],
|
||||
['text', '/{static'],
|
||||
],
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'Route without separator between variables',
|
||||
array('/{w}{x}{y}{z}.{_format}', array('z' => 'default-z', '_format' => 'html'), array('y' => '(y|Y)')),
|
||||
'', '#^/(?P<w>[^/\.]+)(?P<x>[^/\.]+)(?P<y>(?:y|Y))(?:(?P<z>[^/\.]++)(?:\.(?P<_format>[^/]++))?)?$#sD', array('w', 'x', 'y', 'z', '_format'), array(
|
||||
array('variable', '.', '[^/]++', '_format'),
|
||||
array('variable', '', '[^/\.]++', 'z'),
|
||||
array('variable', '', '(?:y|Y)', 'y'),
|
||||
array('variable', '', '[^/\.]+', 'x'),
|
||||
array('variable', '/', '[^/\.]+', 'w'),
|
||||
),
|
||||
),
|
||||
['/{w}{x}{y}{z}.{_format}', ['z' => 'default-z', '_format' => 'html'], ['y' => '(y|Y)']],
|
||||
'', '#^/(?P<w>[^/\.]+)(?P<x>[^/\.]+)(?P<y>(?:y|Y))(?:(?P<z>[^/\.]++)(?:\.(?P<_format>[^/]++))?)?$#sD', ['w', 'x', 'y', 'z', '_format'], [
|
||||
['variable', '.', '[^/]++', '_format'],
|
||||
['variable', '', '[^/\.]++', 'z'],
|
||||
['variable', '', '(?:y|Y)', 'y'],
|
||||
['variable', '', '[^/\.]+', 'x'],
|
||||
['variable', '/', '[^/\.]+', 'w'],
|
||||
],
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'Route with a format',
|
||||
array('/foo/{bar}.{_format}'),
|
||||
'/foo', '#^/foo/(?P<bar>[^/\.]++)\.(?P<_format>[^/]++)$#sD', array('bar', '_format'), array(
|
||||
array('variable', '.', '[^/]++', '_format'),
|
||||
array('variable', '/', '[^/\.]++', 'bar'),
|
||||
array('text', '/foo'),
|
||||
),
|
||||
),
|
||||
['/foo/{bar}.{_format}'],
|
||||
'/foo', '#^/foo/(?P<bar>[^/\.]++)\.(?P<_format>[^/]++)$#sD', ['bar', '_format'], [
|
||||
['variable', '.', '[^/]++', '_format'],
|
||||
['variable', '/', '[^/\.]++', 'bar'],
|
||||
['text', '/foo'],
|
||||
],
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'Static non UTF-8 route',
|
||||
array("/fo\xE9"),
|
||||
"/fo\xE9", "#^/fo\xE9$#sD", array(), array(
|
||||
array('text', "/fo\xE9"),
|
||||
),
|
||||
),
|
||||
["/fo\xE9"],
|
||||
"/fo\xE9", "#^/fo\xE9$#sD", [], [
|
||||
['text', "/fo\xE9"],
|
||||
],
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'Route with an explicit UTF-8 requirement',
|
||||
array('/{bar}', array('bar' => null), array('bar' => '.'), array('utf8' => true)),
|
||||
'', '#^/(?P<bar>.)?$#sDu', array('bar'), array(
|
||||
array('variable', '/', '.', 'bar', true),
|
||||
),
|
||||
),
|
||||
);
|
||||
['/{bar}', ['bar' => null], ['bar' => '.'], ['utf8' => true]],
|
||||
'', '#^/(?P<bar>.)?$#sDu', ['bar'], [
|
||||
['variable', '/', '.', 'bar', true],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -201,45 +201,45 @@ class RouteCompilerTest extends TestCase
|
||||
|
||||
public function provideCompileImplicitUtf8Data()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
return [
|
||||
[
|
||||
'Static UTF-8 route',
|
||||
array('/foé'),
|
||||
'/foé', '#^/foé$#sDu', array(), array(
|
||||
array('text', '/foé'),
|
||||
),
|
||||
['/foé'],
|
||||
'/foé', '#^/foé$#sDu', [], [
|
||||
['text', '/foé'],
|
||||
],
|
||||
'patterns',
|
||||
),
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'Route with an implicit UTF-8 requirement',
|
||||
array('/{bar}', array('bar' => null), array('bar' => 'é')),
|
||||
'', '#^/(?P<bar>é)?$#sDu', array('bar'), array(
|
||||
array('variable', '/', 'é', 'bar', true),
|
||||
),
|
||||
['/{bar}', ['bar' => null], ['bar' => 'é']],
|
||||
'', '#^/(?P<bar>é)?$#sDu', ['bar'], [
|
||||
['variable', '/', 'é', 'bar', true],
|
||||
],
|
||||
'requirements',
|
||||
),
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'Route with a UTF-8 class requirement',
|
||||
array('/{bar}', array('bar' => null), array('bar' => '\pM')),
|
||||
'', '#^/(?P<bar>\pM)?$#sDu', array('bar'), array(
|
||||
array('variable', '/', '\pM', 'bar', true),
|
||||
),
|
||||
['/{bar}', ['bar' => null], ['bar' => '\pM']],
|
||||
'', '#^/(?P<bar>\pM)?$#sDu', ['bar'], [
|
||||
['variable', '/', '\pM', 'bar', true],
|
||||
],
|
||||
'requirements',
|
||||
),
|
||||
],
|
||||
|
||||
array(
|
||||
[
|
||||
'Route with a UTF-8 separator',
|
||||
array('/foo/{bar}§{_format}', array(), array(), array('compiler_class' => Utf8RouteCompiler::class)),
|
||||
'/foo', '#^/foo/(?P<bar>[^/§]++)§(?P<_format>[^/]++)$#sDu', array('bar', '_format'), array(
|
||||
array('variable', '§', '[^/]++', '_format', true),
|
||||
array('variable', '/', '[^/§]++', 'bar', true),
|
||||
array('text', '/foo'),
|
||||
),
|
||||
['/foo/{bar}§{_format}', [], [], ['compiler_class' => Utf8RouteCompiler::class]],
|
||||
'/foo', '#^/foo/(?P<bar>[^/§]++)§(?P<_format>[^/]++)$#sDu', ['bar', '_format'], [
|
||||
['variable', '§', '[^/]++', '_format', true],
|
||||
['variable', '/', '[^/§]++', 'bar', true],
|
||||
['text', '/foo'],
|
||||
],
|
||||
'patterns',
|
||||
),
|
||||
);
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -257,7 +257,7 @@ class RouteCompilerTest extends TestCase
|
||||
*/
|
||||
public function testRouteCharsetMismatch()
|
||||
{
|
||||
$route = new Route("/\xE9/{bar}", array(), array('bar' => '.'), array('utf8' => true));
|
||||
$route = new Route("/\xE9/{bar}", [], ['bar' => '.'], ['utf8' => true]);
|
||||
|
||||
$compiled = $route->compile();
|
||||
}
|
||||
@@ -267,7 +267,7 @@ class RouteCompilerTest extends TestCase
|
||||
*/
|
||||
public function testRequirementCharsetMismatch()
|
||||
{
|
||||
$route = new Route('/foo/{bar}', array(), array('bar' => "\xE9"), array('utf8' => true));
|
||||
$route = new Route('/foo/{bar}', [], ['bar' => "\xE9"], ['utf8' => true]);
|
||||
|
||||
$compiled = $route->compile();
|
||||
}
|
||||
@@ -294,11 +294,11 @@ class RouteCompilerTest extends TestCase
|
||||
|
||||
public function getVariableNamesStartingWithADigit()
|
||||
{
|
||||
return array(
|
||||
array('09'),
|
||||
array('123'),
|
||||
array('1e2'),
|
||||
);
|
||||
return [
|
||||
['09'],
|
||||
['123'],
|
||||
['1e2'],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -311,65 +311,65 @@ class RouteCompilerTest extends TestCase
|
||||
|
||||
$compiled = $route->compile();
|
||||
$this->assertEquals($prefix, $compiled->getStaticPrefix(), $name.' (static prefix)');
|
||||
$this->assertEquals($regex, str_replace(array("\n", ' '), '', $compiled->getRegex()), $name.' (regex)');
|
||||
$this->assertEquals($regex, str_replace(["\n", ' '], '', $compiled->getRegex()), $name.' (regex)');
|
||||
$this->assertEquals($variables, $compiled->getVariables(), $name.' (variables)');
|
||||
$this->assertEquals($pathVariables, $compiled->getPathVariables(), $name.' (path variables)');
|
||||
$this->assertEquals($tokens, $compiled->getTokens(), $name.' (tokens)');
|
||||
$this->assertEquals($hostRegex, str_replace(array("\n", ' '), '', $compiled->getHostRegex()), $name.' (host regex)');
|
||||
$this->assertEquals($hostRegex, str_replace(["\n", ' '], '', $compiled->getHostRegex()), $name.' (host regex)');
|
||||
$this->assertEquals($hostVariables, $compiled->getHostVariables(), $name.' (host variables)');
|
||||
$this->assertEquals($hostTokens, $compiled->getHostTokens(), $name.' (host tokens)');
|
||||
}
|
||||
|
||||
public function provideCompileWithHostData()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
return [
|
||||
[
|
||||
'Route with host pattern',
|
||||
array('/hello', array(), array(), array(), 'www.example.com'),
|
||||
'/hello', '#^/hello$#sD', array(), array(), array(
|
||||
array('text', '/hello'),
|
||||
),
|
||||
'#^www\.example\.com$#sDi', array(), array(
|
||||
array('text', 'www.example.com'),
|
||||
),
|
||||
),
|
||||
array(
|
||||
['/hello', [], [], [], 'www.example.com'],
|
||||
'/hello', '#^/hello$#sD', [], [], [
|
||||
['text', '/hello'],
|
||||
],
|
||||
'#^www\.example\.com$#sDi', [], [
|
||||
['text', 'www.example.com'],
|
||||
],
|
||||
],
|
||||
[
|
||||
'Route with host pattern and some variables',
|
||||
array('/hello/{name}', array(), array(), array(), 'www.example.{tld}'),
|
||||
'/hello', '#^/hello/(?P<name>[^/]++)$#sD', array('tld', 'name'), array('name'), array(
|
||||
array('variable', '/', '[^/]++', 'name'),
|
||||
array('text', '/hello'),
|
||||
),
|
||||
'#^www\.example\.(?P<tld>[^\.]++)$#sDi', array('tld'), array(
|
||||
array('variable', '.', '[^\.]++', 'tld'),
|
||||
array('text', 'www.example'),
|
||||
),
|
||||
),
|
||||
array(
|
||||
['/hello/{name}', [], [], [], 'www.example.{tld}'],
|
||||
'/hello', '#^/hello/(?P<name>[^/]++)$#sD', ['tld', 'name'], ['name'], [
|
||||
['variable', '/', '[^/]++', 'name'],
|
||||
['text', '/hello'],
|
||||
],
|
||||
'#^www\.example\.(?P<tld>[^\.]++)$#sDi', ['tld'], [
|
||||
['variable', '.', '[^\.]++', 'tld'],
|
||||
['text', 'www.example'],
|
||||
],
|
||||
],
|
||||
[
|
||||
'Route with variable at beginning of host',
|
||||
array('/hello', array(), array(), array(), '{locale}.example.{tld}'),
|
||||
'/hello', '#^/hello$#sD', array('locale', 'tld'), array(), array(
|
||||
array('text', '/hello'),
|
||||
),
|
||||
'#^(?P<locale>[^\.]++)\.example\.(?P<tld>[^\.]++)$#sDi', array('locale', 'tld'), array(
|
||||
array('variable', '.', '[^\.]++', 'tld'),
|
||||
array('text', '.example'),
|
||||
array('variable', '', '[^\.]++', 'locale'),
|
||||
),
|
||||
),
|
||||
array(
|
||||
['/hello', [], [], [], '{locale}.example.{tld}'],
|
||||
'/hello', '#^/hello$#sD', ['locale', 'tld'], [], [
|
||||
['text', '/hello'],
|
||||
],
|
||||
'#^(?P<locale>[^\.]++)\.example\.(?P<tld>[^\.]++)$#sDi', ['locale', 'tld'], [
|
||||
['variable', '.', '[^\.]++', 'tld'],
|
||||
['text', '.example'],
|
||||
['variable', '', '[^\.]++', 'locale'],
|
||||
],
|
||||
],
|
||||
[
|
||||
'Route with host variables that has a default value',
|
||||
array('/hello', array('locale' => 'a', 'tld' => 'b'), array(), array(), '{locale}.example.{tld}'),
|
||||
'/hello', '#^/hello$#sD', array('locale', 'tld'), array(), array(
|
||||
array('text', '/hello'),
|
||||
),
|
||||
'#^(?P<locale>[^\.]++)\.example\.(?P<tld>[^\.]++)$#sDi', array('locale', 'tld'), array(
|
||||
array('variable', '.', '[^\.]++', 'tld'),
|
||||
array('text', '.example'),
|
||||
array('variable', '', '[^\.]++', 'locale'),
|
||||
),
|
||||
),
|
||||
);
|
||||
['/hello', ['locale' => 'a', 'tld' => 'b'], [], [], '{locale}.example.{tld}'],
|
||||
'/hello', '#^/hello$#sD', ['locale', 'tld'], [], [
|
||||
['text', '/hello'],
|
||||
],
|
||||
'#^(?P<locale>[^\.]++)\.example\.(?P<tld>[^\.]++)$#sDi', ['locale', 'tld'], [
|
||||
['variable', '.', '[^\.]++', 'tld'],
|
||||
['text', '.example'],
|
||||
['variable', '', '[^\.]++', 'locale'],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -386,19 +386,19 @@ class RouteCompilerTest extends TestCase
|
||||
*/
|
||||
public function testRemoveCapturingGroup($regex, $requirement)
|
||||
{
|
||||
$route = new Route('/{foo}', array(), array('foo' => $requirement));
|
||||
$route = new Route('/{foo}', [], ['foo' => $requirement]);
|
||||
|
||||
$this->assertSame($regex, $route->compile()->getRegex());
|
||||
}
|
||||
|
||||
public function provideRemoveCapturingGroup()
|
||||
{
|
||||
yield array('#^/(?P<foo>a(?:b|c)(?:d|e)f)$#sD', 'a(b|c)(d|e)f');
|
||||
yield array('#^/(?P<foo>a\(b\)c)$#sD', 'a\(b\)c');
|
||||
yield array('#^/(?P<foo>(?:b))$#sD', '(?:b)');
|
||||
yield array('#^/(?P<foo>(?(b)b))$#sD', '(?(b)b)');
|
||||
yield array('#^/(?P<foo>(*F))$#sD', '(*F)');
|
||||
yield array('#^/(?P<foo>(?:(?:foo)))$#sD', '((foo))');
|
||||
yield ['#^/(?P<foo>a(?:b|c)(?:d|e)f)$#sD', 'a(b|c)(d|e)f'];
|
||||
yield ['#^/(?P<foo>a\(b\)c)$#sD', 'a\(b\)c'];
|
||||
yield ['#^/(?P<foo>(?:b))$#sD', '(?:b)'];
|
||||
yield ['#^/(?P<foo>(?(b)b))$#sD', '(?(b)b)'];
|
||||
yield ['#^/(?P<foo>(*F))$#sD', '(*F)'];
|
||||
yield ['#^/(?P<foo>(?:(?:foo)))$#sD', '((foo))'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user