public function FieldEntityLinkTest::testEntityLink in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Tests/Handler/FieldEntityLinkTest.php \Drupal\views\Tests\Handler\FieldEntityLinkTest::testEntityLink()
Tests entity link fields.
File
- core/
modules/ views/ src/ Tests/ Handler/ FieldEntityLinkTest.php, line 73 - Contains \Drupal\views\Tests\Handler\FieldEntityLinkTest.
Class
- FieldEntityLinkTest
- Tests the core Drupal\views\Plugin\views\field\EntityOperations handler.
Namespace
Drupal\views\Tests\HandlerCode
public function testEntityLink() {
// Anonymous users cannot see edit/delete links.
$expected_results = [
'canonical' => TRUE,
'edit-form' => FALSE,
'delete-form' => FALSE,
];
$this
->doTestEntityLink(\Drupal::currentUser(), $expected_results);
// Admin users cannot see all links.
$expected_results = [
'canonical' => TRUE,
'edit-form' => TRUE,
'delete-form' => TRUE,
];
$this
->doTestEntityLink($this->adminUser, $expected_results);
}