function EntityFieldTest::testReadWrite

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php \Drupal\KernelTests\Core\Entity\EntityFieldTest::testReadWrite()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php \Drupal\KernelTests\Core\Entity\EntityFieldTest::testReadWrite()
  3. 10 core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php \Drupal\KernelTests\Core\Entity\EntityFieldTest::testReadWrite()

Tests reading and writing properties and field items.

File

core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php, line 139

Class

EntityFieldTest
Tests the Entity Field API.

Namespace

Drupal\KernelTests\Core\Entity

Code

public function testReadWrite() : void {
  // All entity variations have to have the same results.
  foreach (EntityTestHelper::getEntityTypes() as $entity_type) {
    $this->doTestReadWrite($entity_type);
  }
}

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