protected function ThemeHandlerTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 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()
Overrides UnitTestCase::setUp
File
- core/
tests/ Drupal/ Tests/ Core/ Extension/ ThemeHandlerTest.php, line 46 - Contains \Drupal\Tests\Core\Extension\ThemeHandlerTest.
Class
- ThemeHandlerTest
- @coversDefaultClass \Drupal\Core\Extension\ThemeHandler @group Extension
Namespace
Drupal\Tests\Core\ExtensionCode
protected function setUp() : void {
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);
}