function EntityApiTest::testCRUD

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Entity/EntityApiTest.php \Drupal\KernelTests\Core\Entity\EntityApiTest::testCRUD()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Entity/EntityApiTest.php \Drupal\KernelTests\Core\Entity\EntityApiTest::testCRUD()
  3. 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 36

Class

EntityApiTest
Tests basic CRUD functionality.

Namespace

Drupal\KernelTests\Core\Entity

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.