$this->
assertEquals(FALSE,
$this->accessManager->
checkNamedRoute('test_route_1',
[],
$this->account
));
$this->
assertEquals(AccessResult::
forbidden(),
$this->accessManager->
checkNamedRoute('test_route_1',
[],
$this->account, TRUE
));
} /**
* Tests checkNamedRoute given an invalid/non existing route name.
*/
public function testCheckNamedRouteWithNonExistingRoute() { $this->routeProvider->
expects($this->
any()) ->
method('getRouteByName'
) ->
will($this->
throwException(new RouteNotFoundException()));
$this->
setupAccessChecker();
$this->
assertEquals(FALSE,
$this->accessManager->
checkNamedRoute('test_route_1',
[],
$this->account
), 'A non existing route lead to access.'
);
$this->
assertEquals(AccessResult::
forbidden()->
addCacheTags(['config:core.extension'
]),
$this->accessManager->
checkNamedRoute('test_route_1',
[],
$this->account, TRUE
), 'A non existing route lead to access.'
);
} /**
* Tests that an access checker throws an exception for not allowed values.
*
* @dataProvider providerCheckException
*/