function ViewsHandlerManagerTest::setupMockedFactory
Same name and namespace in other branches
- 11.x core/modules/views/tests/src/Unit/ViewsHandlerManagerTest.php \Drupal\Tests\views\Unit\ViewsHandlerManagerTest::setupMockedFactory()
- 10 core/modules/views/tests/src/Unit/ViewsHandlerManagerTest.php \Drupal\Tests\views\Unit\ViewsHandlerManagerTest::setupMockedFactory()
- 8.9.x core/modules/views/tests/src/Unit/ViewsHandlerManagerTest.php \Drupal\Tests\views\Unit\ViewsHandlerManagerTest::setupMockedFactory()
Setups of the plugin factory.
File
-
core/
modules/ views/ tests/ src/ Unit/ ViewsHandlerManagerTest.php, line 57
Class
- ViewsHandlerManagerTest
- Tests the ViewsHandlerManager class.
Namespace
Drupal\Tests\views\UnitCode
protected function setupMockedFactory() {
$this->factory = $this->createMock('Drupal\\Component\\Plugin\\Factory\\FactoryInterface');
$reflection = new \ReflectionClass($this->handlerManager);
$property = $reflection->getProperty('factory');
$property->setAccessible(TRUE);
$property->setValue($this->handlerManager, $this->factory);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.