$this->
assertEquals('{locale}.example.com',
$routeb->
getHost());
} public function testSetCondition() { $collection =
new RouteCollection();
$routea =
new Route('/a'
);
$routeb =
new Route('/b',
[],
[],
[], '{locale}.example.net',
[],
[], 'context.getMethod() == "GET"'
);
$collection->
add('a',
$routea);
$collection->
add('b',
$routeb);
$collection->
setCondition('context.getMethod() == "POST"'
);
$this->
assertEquals('context.getMethod() == "POST"',
$routea->
getCondition());
$this->
assertEquals('context.getMethod() == "POST"',
$routeb->
getCondition());
} public function testClone() { $collection =
new RouteCollection();
$collection->
add('a',
new Route('/a'
));
$collection->
add('b',
new Route('/b',
['placeholder' => 'default'
],
['placeholder' => '.+'
]));