function EntityFieldDefaultValueTest::testDefaultValues

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

Tests default values on entities and fields.

File

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

Class

EntityFieldDefaultValueTest
Tests default values for entity fields.

Namespace

Drupal\KernelTests\Core\Entity

Code

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

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