You are here

public function EntityDeriverTest::testDerivatives in Drupal 8

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

Tests that types are derived for entity types with and without bundles.

@dataProvider derivativesProvider

File

core/tests/Drupal/KernelTests/Core/Entity/EntityDeriverTest.php, line 61

Class

EntityDeriverTest
Tests EntityDeriver functionality.

Namespace

Drupal\KernelTests\Core\Entity

Code

public function testDerivatives($data_type, $expect_exception) {
  if ($expect_exception) {
    $this
      ->expectException(PluginNotFoundException::class);
  }
  $this->typedDataManager
    ->createDataDefinition($data_type);
}