You are here

public function CategorizingPluginManager::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php \Drupal\Tests\Core\Plugin\CategorizingPluginManager::__construct()
  2. 9 core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php \Drupal\Tests\Core\Plugin\CategorizingPluginManager::__construct()

Replace the constructor so we can instantiate a stub.

Parameters

\Drupal\Core\Extension\ModuleHandlerInterface|\PHPUnit\Framework\MockObject\MockObject $module_handler: The module handler.

Overrides DefaultPluginManager::__construct

File

core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php, line 119
Contains \Drupal\Tests\Core\Plugin\CategorizingPluginManagerTraitTest.

Class

CategorizingPluginManager
Class that allows testing the trait.

Namespace

Drupal\Tests\Core\Plugin

Code

public function __construct(ModuleHandlerInterface $module_handler) {
  $this->moduleHandler = $module_handler;
}