public function UrlTest::testRenderAccess in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/UrlTest.php \Drupal\Tests\Core\UrlTest::testRenderAccess()
Tests the renderAccess() method.
@covers ::renderAccess @dataProvider accessProvider
Parameters
bool $access:
File
- core/
tests/ Drupal/ Tests/ Core/ UrlTest.php, line 498 - Contains \Drupal\Tests\Core\UrlTest.
Class
- UrlTest
- @coversDefaultClass \Drupal\Core\Url @group UrlTest
Namespace
Drupal\Tests\CoreCode
public function testRenderAccess($access) {
$element = array(
'#url' => Url::fromRoute('entity.node.canonical', [
'node' => 3,
]),
);
$this->container
->set('current_user', $this
->getMock('Drupal\\Core\\Session\\AccountInterface'));
$this->container
->set('access_manager', $this
->getMockAccessManager($access));
$this
->assertEquals($access, TestUrl::renderAccess($element));
}