public function ChainRouterTest::testContextOrder in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony-cmf/routing/Tests/Routing/ChainRouterTest.php \Symfony\Cmf\Component\Routing\Tests\Routing\ChainRouterTest::testContextOrder()
context must be propagated also when routers are added after context is set
File
- vendor/
symfony-cmf/ routing/ Tests/ Routing/ ChainRouterTest.php, line 166
Class
Namespace
Symfony\Cmf\Component\Routing\Tests\RoutingCode
public function testContextOrder() {
list($low, $high) = $this
->createRouterMocks();
$low
->expects($this
->once())
->method('setContext')
->with($this->context);
$high
->expects($this
->once())
->method('setContext')
->with($this->context);
$this->router
->setContext($this->context);
$this->router
->add($low, 10);
$this->router
->add($high, 100);
$this->router
->all();
$this
->assertSame($this->context, $this->router
->getContext());
}