public function TestContextAwarePlugin::setContext in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginBaseTest.php \Drupal\KernelTests\Core\Plugin\Context\TestContextAwarePlugin::setContext()
Set a context on this plugin.
Parameters
string $name: The name of the context in the plugin configuration.
\Drupal\Component\Plugin\Context\ContextInterface $context: The context object to set.
Overrides ContextAwarePluginInterface::setContext
File
- core/
tests/ Drupal/ KernelTests/ Core/ Plugin/ Context/ ContextAwarePluginTraitTest.php, line 149
Class
Namespace
Drupal\KernelTests\Core\Plugin\ContextCode
public function setContext($name, ComponentContextInterface $context) {
$this
->setContextTrait($name, $context);
$this->setContextCalled = TRUE;
}