You are here

function ThemeInstallerTest::testEmpty in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/system/src/Tests/Extension/ThemeInstallerTest.php \Drupal\system\Tests\Extension\ThemeInstallerTest::testEmpty()

Verifies that no themes are installed by default.

File

core/modules/system/src/Tests/Extension/ThemeInstallerTest.php, line 44
Contains \Drupal\system\Tests\Extension\ThemeInstallerTest.

Class

ThemeInstallerTest
Tests installing and uninstalling of themes.

Namespace

Drupal\system\Tests\Extension

Code

function testEmpty() {
  $this
    ->assertFalse($this
    ->extensionConfig()
    ->get('theme'));
  $this
    ->assertFalse(array_keys($this
    ->themeHandler()
    ->listInfo()));
  $this
    ->assertFalse(array_keys(system_list('theme')));

  // Rebuilding available themes should always yield results though.
  $this
    ->assertTrue($this
    ->themeHandler()
    ->rebuildThemeData()['stark'], 'ThemeHandler::rebuildThemeData() yields all available themes.');

  // theme_get_setting() should return global default theme settings.
  $this
    ->assertIdentical(theme_get_setting('features.favicon'), TRUE);
}