You are here

public function ContextAwarePluginTraitTest::setUp in Drupal 9

Overrides KernelTestBase::setUp

File

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

Class

ContextAwarePluginTraitTest
@coversDefaultClass \Drupal\Core\Plugin\ContextAwarePluginTrait

Namespace

Drupal\KernelTests\Core\Plugin\Context

Code

public 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);
}