function AccessAwareRouterTest::testCall
Ensure that methods are passed to the wrapped router.
@covers ::__call
      
    
File
- 
              core/tests/ Drupal/ Tests/ Core/ Routing/ AccessAwareRouterTest.php, line 130 
Class
- AccessAwareRouterTest
- @coversDefaultClass \Drupal\Core\Routing\AccessAwareRouter[[api-linebreak]] @group Routing
Namespace
Drupal\Tests\Core\RoutingCode
public function testCall() {
  $mock_router = $this->createMock('Symfony\\Component\\Routing\\RouterInterface');
  $this->router = $this->getMockBuilder('Drupal\\Core\\Routing\\Router')
    ->disableOriginalConstructor()
    ->addMethods([
    'add',
  ])
    ->getMock();
  $this->router
    ->expects($this->once())
    ->method('add')
    ->with($mock_router)
    ->willReturnSelf();
  $this->accessAwareRouter = new AccessAwareRouter($this->router, $this->accessManager, $this->currentUser);
  $this->accessAwareRouter
    ->add($mock_router);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
