You are here

public function EntityFieldDefaultValueTest::testDefaultValues in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Entity/EntityFieldDefaultValueTest.php \Drupal\KernelTests\Core\Entity\EntityFieldDefaultValueTest::testDefaultValues()
  2. 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 31

Class

EntityFieldDefaultValueTest
Tests default values for entity fields.

Namespace

Drupal\KernelTests\Core\Entity

Code

public function testDefaultValues() {

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