You are here

protected function EntityLocalTaskTest::assertLocalTasks in Entity API 8

Asserts that the entity's local tasks are visible.

1 call to EntityLocalTaskTest::assertLocalTasks()
EntityLocalTaskTest::testCollectionLocalAction in tests/src/Functional/Menu/EntityLocalTaskTest.php
Tests the local tasks of the entity are provided correctly.

File

tests/src/Functional/Menu/EntityLocalTaskTest.php, line 74

Class

EntityLocalTaskTest
Tests that entity local tasks are generated correctly.

Namespace

Drupal\Tests\entity\Functional\Menu

Code

protected function assertLocalTasks() {
  $this
    ->assertSession()
    ->linkByHrefExists($this->viewPath);
  $this
    ->assertSession()
    ->linkExists('View');
  $this
    ->assertSession()
    ->linkByHrefExists("{$this->viewPath}/edit");
  $this
    ->assertSession()
    ->linkExists('Edit');
  $this
    ->assertSession()
    ->linkByHrefExists("{$this->viewPath}/duplicate");
  $this
    ->assertSession()
    ->linkExists('Duplicate');
  $this
    ->assertSession()
    ->linkByHrefExists("{$this->viewPath}/revisions");
  $this
    ->assertSession()
    ->linkExists('Revisions');
}