public function ContextAwarePluginTraitTest::testGetContextDefinition in Drupal 9
@covers ::getContextDefinition
File
- core/
tests/ Drupal/ KernelTests/ Core/ Plugin/ Context/ ContextAwarePluginTraitTest.php, line 66
Class
- ContextAwarePluginTraitTest
- @coversDefaultClass \Drupal\Core\Plugin\ContextAwarePluginTrait
Namespace
Drupal\KernelTests\Core\Plugin\ContextCode
public function testGetContextDefinition() {
// The context is not defined, so an exception will be thrown.
$this
->expectException(ContextException::class);
$this
->expectExceptionMessage('The person context is not a valid context.');
$this->plugin
->getContextDefinition('person');
}