You are here

public function NavigationalStructureTest::entityAddPage in Entity Construction Kit (ECK) 8

Tests the entity add page.

@test

File

tests/src/Functional/NavigationalStructureTest.php, line 460

Class

NavigationalStructureTest
Test Entity Construction Kit's navigational structure.

Namespace

Drupal\Tests\eck\Functional

Code

public function entityAddPage() {
  $route = 'eck.entity.add_page';
  $routeArguments = [
    'eck_entity_type' => $this->entityTypeMachineName,
  ];
  $expectedUrl = "admin/content/{$this->entityTypeMachineName}/add";
  $expectedTitle = "Add {$this->entityTypeLabel} content";
  $crumbs = [
    'Content',
    ucfirst("{$this->entityTypeLabel} content"),
  ];
  $this
    ->assertCorrectPageOnRoute($route, $routeArguments, $expectedUrl, $expectedTitle, $crumbs);
}