function LazyPluginCollectionTestBase::setUpMockPluginManager
Reinitializes the plugin manager as a mock object.
2 calls to LazyPluginCollectionTestBase::setUpMockPluginManager()
- DefaultSingleLazyPluginCollectionTest::setupPluginCollection in core/
tests/ Drupal/ Tests/ Core/ Plugin/ DefaultSingleLazyPluginCollectionTest.php - Sets up the default plugin collection.
- LazyPluginCollectionTestBase::setupPluginCollection in core/
tests/ Drupal/ Tests/ Core/ Plugin/ LazyPluginCollectionTestBase.php - Sets up the default plugin collection.
File
-
core/
tests/ Drupal/ Tests/ Core/ Plugin/ LazyPluginCollectionTestBase.php, line 65
Class
- LazyPluginCollectionTestBase
- Provides a base class for plugin collection tests.
Namespace
Drupal\Tests\Core\PluginCode
protected function setUpMockPluginManager() : void {
$this->pluginManager = $this->createMock(PluginManagerInterface::class);
$this->pluginManager
->method('getDefinitions')
->willReturn($this->getPluginDefinitions());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.