You are here

protected function ThemeHandlerTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 68
Contains \Drupal\Tests\Core\Extension\ThemeHandlerTest.

Class

ThemeHandlerTest
@coversDefaultClass \Drupal\Core\Extension\ThemeHandler @group Extension

Namespace

Drupal\Tests\Core\Extension

Code

protected function setUp() {
  parent::setUp();
  $this->configFactory = $this
    ->getConfigFactoryStub(array(
    'core.extension' => array(
      'module' => array(),
      'theme' => array(),
      'disabled' => array(
        'theme' => array(),
      ),
    ),
  ));
  $this->moduleHandler = $this
    ->getMock('Drupal\\Core\\Extension\\ModuleHandlerInterface');
  $this->state = new State(new KeyValueMemoryFactory());
  $this->infoParser = $this
    ->getMock('Drupal\\Core\\Extension\\InfoParserInterface');
  $this->extensionDiscovery = $this
    ->getMockBuilder('Drupal\\Core\\Extension\\ExtensionDiscovery')
    ->disableOriginalConstructor()
    ->getMock();
  $this->themeHandler = new StubThemeHandler($this->root, $this->configFactory, $this->moduleHandler, $this->state, $this->infoParser, $this->extensionDiscovery);
  $cache_tags_invalidator = $this
    ->getMock('Drupal\\Core\\Cache\\CacheTagsInvalidatorInterface');
  $this
    ->getContainerWithCacheTagsInvalidator($cache_tags_invalidator);
}