/** * Ensure that methods are passed to the wrapped router. * * @covers ::__call */ public function testCall() { $mock_router = $this->getMock('Symfony\\Component\\Routing\\RouterInterface'); $this->chainRouter = $this->getMockBuilder('Symfony\\Cmf\\Component\\Routing\\ChainRouter')->disableOriginalConstructor()->setMethods(['add'])->getMock(); $this->chainRouter->expects($this->once())->method('add')->with($mock_router)->willReturnSelf(); $this->router = new AccessAwareRouter($this->chainRouter, $this->accessManager, $this->currentUser); $this->router->add($mock_router); }