You are here

protected function DefaultLazyPluginCollectionTest::getPluginMock in Zircon Profile 8

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

Returns a mocked plugin object.

Parameters

string $plugin_id: The plugin ID.

array $definition: The plugin definition.

Return value

\Drupal\Component\Plugin\PluginInspectionInterface|\PHPUnit_Framework_MockObject_MockObject

Overrides LazyPluginCollectionTestBase::getPluginMock

File

core/tests/Drupal/Tests/Core/Plugin/DefaultLazyPluginCollectionTest.php, line 210
Contains \Drupal\Tests\Core\Plugin\DefaultLazyPluginCollectionTest.

Class

DefaultLazyPluginCollectionTest
@coversDefaultClass \Drupal\Core\Plugin\DefaultLazyPluginCollection @group Plugin

Namespace

Drupal\Tests\Core\Plugin

Code

protected function getPluginMock($plugin_id, array $definition) {
  return new TestConfigurablePlugin($this->config[$plugin_id], $plugin_id, $definition);
}