function ContextAwarePluginTraitTest::setUp

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

Overrides KernelTestBase::setUp

File

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

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.