function ThemeHandlerTest::setUp
Overrides UnitTestCase::setUp
File
- 
              core/tests/ Drupal/ Tests/ Core/ Extension/ ThemeHandlerTest.php, line 46 
Class
- ThemeHandlerTest
- @coversDefaultClass \Drupal\Core\Extension\ThemeHandler[[api-linebreak]] @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')
    ->willReturn($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.
