function ThemeHandlerTest::setUp
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php \Drupal\Tests\Core\Extension\ThemeHandlerTest::setUp()
- 10 core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php \Drupal\Tests\Core\Extension\ThemeHandlerTest::setUp()
- 11.x core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php \Drupal\Tests\Core\Extension\ThemeHandlerTest::setUp()
Overrides UnitTestCase::setUp
File
-
core/
tests/ Drupal/ Tests/ Core/ Extension/ ThemeHandlerTest.php, line 46
Class
- ThemeHandlerTest
- @coversDefaultClass \Drupal\Core\Extension\ThemeHandler @group Extension
Namespace
Drupal\Tests\Core\ExtensionCode
protected function setUp() {
parent::setUp();
$this->configFactory = $this->getConfigFactoryStub([
'core.extension' => [
'module' => [],
'theme' => [],
'disabled' => [
'theme' => [],
],
],
]);
$this->themeList = $this->getMockBuilder(ThemeExtensionList::class)
->disableOriginalConstructor()
->getMock();
$this->themeHandler = new StubThemeHandler($this->root, $this->configFactory, $this->themeList);
$container = $this->createMock('Symfony\\Component\\DependencyInjection\\ContainerInterface');
$container->expects($this->any())
->method('get')
->with('class_loader')
->will($this->returnValue($this->createMock(ClassLoader::class)));
\Drupal::setContainer($container);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.