You are here

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

Test entity creation.

@test

File

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

Class

NavigationalStructureTest
Test Entity Construction Kit's navigational structure.

Namespace

Drupal\Tests\eck\Functional

Code

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