You are here

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

@test

File

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

Class

EntityCRUDTest
Tests if eck entities are correctly created and updated.

Namespace

Drupal\Tests\eck\Functional

Code

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