You are here

public function EntityApiTest::testCRUD in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Entity/EntityApiTest.php \Drupal\KernelTests\Core\Entity\EntityApiTest::testCRUD()
  2. 10 core/tests/Drupal/KernelTests/Core/Entity/EntityApiTest.php \Drupal\KernelTests\Core\Entity\EntityApiTest::testCRUD()

Tests basic CRUD functionality of the Entity API.

File

core/tests/Drupal/KernelTests/Core/Entity/EntityApiTest.php, line 35

Class

EntityApiTest
Tests basic CRUD functionality.

Namespace

Drupal\KernelTests\Core\Entity

Code

public function testCRUD() {

  // All entity variations have to have the same results.
  foreach (entity_test_entity_types() as $entity_type) {
    $this
      ->assertCRUD($entity_type, $this
      ->createUser());
  }
}