You are here

public function LazyPluginCollectionTestBase::returnPluginMap in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Plugin/LazyPluginCollectionTestBase.php \Drupal\Tests\Core\Plugin\LazyPluginCollectionTestBase::returnPluginMap()

Return callback for createInstance.

Parameters

string $plugin_id: The plugin ID to return the mock plugin for.

Return value

\Drupal\Component\Plugin\PluginInspectionInterface|\PHPUnit_Framework_MockObject_MockObject The mock plugin object.

File

core/tests/Drupal/Tests/Core/Plugin/LazyPluginCollectionTestBase.php, line 92
Contains \Drupal\Tests\Core\Plugin\LazyPluginCollectionTestBase.

Class

LazyPluginCollectionTestBase
Provides a base class for plugin collection tests.

Namespace

Drupal\Tests\Core\Plugin

Code

public function returnPluginMap($plugin_id) {
  if (isset($this->pluginInstances[$plugin_id])) {
    return $this->pluginInstances[$plugin_id];
  }
}