You are here

protected function ContextAwarePluginTraitTest::setUp in Drupal 10

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php \Drupal\KernelTests\Core\Plugin\Context\ContextAwarePluginTraitTest::setUp()

File

core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php, line 45

Class

ContextAwarePluginTraitTest
@coversDefaultClass \Drupal\Core\Plugin\ContextAwarePluginTrait

Namespace

Drupal\KernelTests\Core\Plugin\Context

Code

protected function setUp() : void {
  parent::setUp();
  $plugin_definition = new TestContextAwarePluginDefinition();
  $plugin_definition
    ->addContextDefinition('nato_letter', ContextDefinition::create('string'));
  $this->plugin = new TestContextAwarePlugin([], 'the_sisko', $plugin_definition);
  $this->configurablePlugin = new TestConfigurableContextAwarePlugin([], 'the_sisko', $plugin_definition);
}