You are here

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

Tests entity type deletion.

@test

Throws

\Behat\Mink\Exception\ResponseTextException

File

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

Class

NavigationalStructureTest
Test Entity Construction Kit's navigational structure.

Namespace

Drupal\Tests\eck\Functional

Code

public function entityTypeDelete() {
  $route = 'entity.eck_entity_type.delete_form';
  $routeArguments = [
    'eck_entity_type' => $this->entityTypeMachineName,
  ];
  $expectedUrl = "admin/structure/eck/{$this->entityTypeMachineName}/delete";
  $expectedTitle = "Are you sure you want to delete entity type {$this->entityTypeLabel}?";
  $crumbs = [
    'Structure',
    'ECK Entity Types',
    "Edit entity type",
  ];
  $this
    ->assertCorrectPageOnRoute($route, $routeArguments, $expectedUrl, $expectedTitle, $crumbs);
  $this
    ->assertSession()
    ->pageTextContains("Configuration deletions The listed configuration will be deleted.{$this->entityTypeLabel} type");
  $this
    ->assertSession()
    ->pageTextContains($this->entityBundleLabel);
}