function TokenTest::setUpMockModuleHandler
Reinitializes the module handler as a mock object.
1 call to TokenTest::setUpMockModuleHandler()
- TokenTest::testGetInfo in core/
tests/ Drupal/ Tests/ Core/ Utility/ TokenTest.php - Tests get info.
File
-
core/
tests/ Drupal/ Tests/ Core/ Utility/ TokenTest.php, line 137
Class
Namespace
Drupal\Tests\Core\UtilityCode
protected function setUpMockModuleHandler() : void {
$this->moduleHandler = $this->createMock(ModuleHandlerInterface::class);
$reflection = new \ReflectionProperty($this->token, 'moduleHandler');
$reflection->setValue($this->token, $this->moduleHandler);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.