function EntityDeriverTest::testDerivatives

Same name in other branches
  1. 8.9.x 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()
  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 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);
}

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