You are here

public function EntityCRUDTest::attemptedCreationOfNonExistingBundleResultsIn404 in Entity Construction Kit (ECK) 8

@test

File

tests/src/Functional/EntityCRUDTest.php, line 129

Class

EntityCRUDTest
Tests if eck entities are correctly created and updated.

Namespace

Drupal\Tests\eck\Functional

Code

public function attemptedCreationOfNonExistingBundleResultsIn404() {
  $this
    ->createEntityType([], 'TestType');
  $params = [
    'eck_entity_type' => 'testtype',
    'eck_entity_bundle' => 'non-existing',
  ];
  $url = Url::fromRoute('eck.entity.add', $params);
  $this
    ->drupalGet($url);
  $this
    ->assertSession()
    ->statusCodeEquals(404);
}