public function ContextDefinitionTest::testEntityContextDefinitionAssert in Drupal 10
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/Core/Plugin/ContextDefinitionTest.php \Drupal\KernelTests\Core\Plugin\ContextDefinitionTest::testEntityContextDefinitionAssert()
@covers ::__construct
File
- core/
tests/ Drupal/ KernelTests/ Core/ Plugin/ ContextDefinitionTest.php, line 41
Class
- ContextDefinitionTest
- @coversDefaultClass \Drupal\Core\Plugin\Context\ContextDefinition @group Plugin
Namespace
Drupal\KernelTests\Core\PluginCode
public function testEntityContextDefinitionAssert() {
$this
->expectException(\AssertionError::class);
$this
->expectExceptionMessage('assert(strpos($data_type, \'entity:\') !== 0 || $this instanceof EntityContextDefinition)');
new ContextDefinition('entity:entity_test');
}