function EntityDeriverTest::testDerivatives

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Entity/EntityDeriverTest.php \Drupal\KernelTests\Core\Entity\EntityDeriverTest::testDerivatives()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Entity/EntityDeriverTest.php \Drupal\KernelTests\Core\Entity\EntityDeriverTest::testDerivatives()
  3. 11.x 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 63

Class

EntityDeriverTest
Tests EntityDeriver functionality.

Namespace

Drupal\KernelTests\Core\Entity

Code

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

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