function ContextAwarePluginBaseTest::testGetContextDefinition
@covers ::getContextDefinition
      
    
File
- 
              core/tests/ Drupal/ KernelTests/ Core/ Plugin/ Context/ ContextAwarePluginBaseTest.php, line 60 
Class
- ContextAwarePluginBaseTest
- @coversDefaultClass \Drupal\Core\Plugin\ContextAwarePluginBase[[api-linebreak]]
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');
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
