3 namespace Drupal\Tests\system\Functional\Update;
5 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
8 * Tests the upgrade path for introducing the Stable base theme.
10 * @see https://www.drupal.org/node/2575421
14 class StableBaseThemeUpdateTest extends UpdatePathTestBase {
19 * @var \Drupal\Core\Extension\ThemeHandlerInterface
21 protected $themeHandler;
26 protected function setDatabaseDumpFiles() {
27 $this->databaseDumpFiles = [
28 __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
29 __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.stable-base-theme-2575421.php',
36 protected function setUp() {
38 $this->themeHandler = $this->container->get('theme_handler');
39 $this->themeHandler->refreshInfo();
43 * Tests that the Stable base theme is installed if necessary.
45 public function testUpdateHookN() {
46 $this->assertTrue($this->themeHandler->themeExists('test_stable'));
47 $this->assertFalse($this->themeHandler->themeExists('stable'));
51 // Refresh the theme handler now that Stable has been installed.
52 $this->themeHandler->refreshInfo();
53 $this->assertTrue($this->themeHandler->themeExists('stable'));