3 namespace Drupal\system\Tests\Update;
6 * Tests the upgrade path for introducing the Stable base theme.
8 * @see https://www.drupal.org/node/2575421
12 class StableBaseThemeUpdateTest extends UpdatePathTestBase {
17 * @var \Drupal\Core\Extension\ThemeHandlerInterface
19 protected $themeHandler;
24 protected function setDatabaseDumpFiles() {
25 $this->databaseDumpFiles = [
26 __DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
27 __DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.stable-base-theme-2575421.php',
34 protected function setUp() {
36 $this->themeHandler = $this->container->get('theme_handler');
37 $this->themeHandler->refreshInfo();
41 * Tests that the Stable base theme is installed if necessary.
43 public function testUpdateHookN() {
44 $this->assertTrue($this->themeHandler->themeExists('test_stable'));
45 $this->assertFalse($this->themeHandler->themeExists('stable'));
49 // Refresh the theme handler now that Stable has been installed.
50 $this->themeHandler->refreshInfo();
51 $this->assertTrue($this->themeHandler->themeExists('stable'));