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
15 class StableBaseThemeUpdateTest extends UpdatePathTestBase {
20 * @var \Drupal\Core\Extension\ThemeHandlerInterface
22 protected $themeHandler;
27 protected function setDatabaseDumpFiles() {
28 $this->databaseDumpFiles = [
29 __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
30 __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.stable-base-theme-2575421.php',
37 protected function setUp() {
39 $this->themeHandler = $this->container->get('theme_handler');
40 $this->themeHandler->refreshInfo();
44 * Tests that the Stable base theme is installed if necessary.
46 public function testUpdateHookN() {
47 $this->assertTrue($this->themeHandler->themeExists('test_stable'));
48 $this->assertFalse($this->themeHandler->themeExists('stable'));
52 // Refresh the theme handler now that Stable has been installed.
53 $this->themeHandler->refreshInfo();
54 $this->assertTrue($this->themeHandler->themeExists('stable'));