public function LazyPluginCollectionTestBase::returnPluginMap in Drupal 8
Same name and namespace in other branches
- 9 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 88
Class
- LazyPluginCollectionTestBase
- Provides a base class for plugin collection tests.
Namespace
Drupal\Tests\Core\PluginCode
public function returnPluginMap($plugin_id) {
if (isset($this->pluginInstances[$plugin_id])) {
return $this->pluginInstances[$plugin_id];
}
}