public function UrlTest::testAccessRouted in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/UrlTest.php \Drupal\Tests\Core\UrlTest::testAccessRouted()
Tests the access() method for routed URLs.
@covers ::access @covers ::accessManager @dataProvider accessProvider
Parameters
bool $access:
File
- core/
tests/ Drupal/ Tests/ Core/ UrlTest.php, line 468 - Contains \Drupal\Tests\Core\UrlTest.
Class
- UrlTest
- @coversDefaultClass \Drupal\Core\Url @group UrlTest
Namespace
Drupal\Tests\CoreCode
public function testAccessRouted($access) {
$account = $this
->getMock('Drupal\\Core\\Session\\AccountInterface');
$url = new TestUrl('entity.node.canonical', [
'node' => 3,
]);
$url
->setAccessManager($this
->getMockAccessManager($access, $account));
$this
->assertEquals($access, $url
->access($account));
}