class StubThemeHandler

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php \Drupal\Tests\Core\Extension\StubThemeHandler
  2. 10 core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php \Drupal\Tests\Core\Extension\StubThemeHandler
  3. 8.9.x core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php \Drupal\Tests\Core\Extension\StubThemeHandler

Extends the default theme handler to mock some drupal_ methods.

Hierarchy

Expanded class hierarchy of StubThemeHandler

File

core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php, line 117

Namespace

Drupal\Tests\Core\Extension
View source
class StubThemeHandler extends ThemeHandler {
  
  /**
   * Whether the CSS cache was cleared.
   *
   * @var bool
   */
  protected $clearedCssCache;
  
  /**
   * Whether the registry should be rebuilt.
   *
   * @var bool
   */
  protected $registryRebuild;
  
  /**
   * {@inheritdoc}
   */
  protected function clearCssCache() {
    $this->clearedCssCache = TRUE;
  }
  
  /**
   * {@inheritdoc}
   */
  protected function themeRegistryRebuild() {
    $this->registryRebuild = TRUE;
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.