MaintenanceThemeTest.php in Zircon Profile 8.0
File
core/tests/Drupal/KernelTests/Core/Theme/MaintenanceThemeTest.php
View source
<?php
namespace Drupal\KernelTests\Core\Theme;
use Drupal\KernelTests\KernelTestBase;
class MaintenanceThemeTest extends KernelTestBase {
public function testMaintenanceTheme() {
$this
->setSetting('maintenance_theme', 'seven');
drupal_maintenance_theme();
$this
->assertTrue(\Drupal::theme()
->hasActiveTheme());
$active_theme = \Drupal::theme()
->getActiveTheme();
$this
->assertEquals('seven', $active_theme
->getName());
$base_themes = $active_theme
->getBaseThemes();
$base_theme_names = array_keys($base_themes);
$this
->assertSame([
'classy',
'stable',
], $base_theme_names);
$classy_base_themes = $base_themes['classy']
->getBaseThemes();
$classy_base_theme_names = array_keys($classy_base_themes);
$this
->assertSame([
'stable',
], $classy_base_theme_names);
}
}