function CategorizingPluginManager::__construct

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php \Drupal\Tests\Core\Plugin\CategorizingPluginManager::__construct()
  2. 10 core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php \Drupal\Tests\Core\Plugin\CategorizingPluginManager::__construct()
  3. 11.x 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

Class

CategorizingPluginManager
Class that allows testing the trait.

Namespace

Drupal\Tests\Core\Plugin

Code

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

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