You are here

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

Tests entity bundle deletion.

@test

File

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

Class

NavigationalStructureTest
Test Entity Construction Kit's navigational structure.

Namespace

Drupal\Tests\eck\Functional

Code

public function entityBundleDelete() {
  $route = "entity.{$this->entityTypeMachineName}_type.delete_form";
  $routeArguments = [
    "{$this->entityTypeMachineName}_type" => $this->entityBundleMachineName,
  ];
  $expectedUrl = "admin/structure/eck/{$this->entityTypeMachineName}/bundles/{$this->entityBundleMachineName}/delete";
  $expectedTitle = "Are you sure you want to delete the entity bundle {$this->entityBundleLabel}?";
  $crumbs = [
    'Structure',
    'ECK Entity Types',
    "Edit entity type",
    ucfirst("{$this->entityTypeLabel} bundles"),
    "Edit {$this->entityTypeLabel} bundle",
  ];
  $this
    ->assertCorrectPageOnRoute($route, $routeArguments, $expectedUrl, $expectedTitle, $crumbs);
}