protected function LocalTaskEntityTest::assertLocalTasksFor in Entity Construction Kit (ECK) 8
Go to a page and check if exist the local task links.
Parameters
string $route: The route.
array $routeArguments: The rout arguments.
1 call to LocalTaskEntityTest::assertLocalTasksFor()
- LocalTaskEntityTest::testLocalTask in tests/
src/ Functional/ LocalTaskEntityTest.php - Tests that the entity contains the local task links.
File
- tests/
src/ Functional/ LocalTaskEntityTest.php, line 76
Class
- LocalTaskEntityTest
- Tests the local task links in entities.
Namespace
Drupal\Tests\eck\FunctionalCode
protected function assertLocalTasksFor($route, array $routeArguments) {
$this
->drupalGet(Url::fromRoute($route, $routeArguments));
$this
->assertLocalTaskLinkRoute("entity.{$this->entityTypeInfo['id']}.canonical", $routeArguments, 'View');
$this
->assertLocalTaskLinkRoute("entity.{$this->entityTypeInfo['id']}.edit_form", $routeArguments, 'Edit');
$this
->assertLocalTaskLinkRoute("entity.{$this->entityTypeInfo['id']}.delete_form", $routeArguments, 'Delete');
}