function StableUninstallUpdateTest::testUpdate

Ensures that Stable is disabled if it's no longer needed.

File

core/modules/system/tests/src/Functional/Update/StableUninstallUpdateTest.php, line 28

Class

StableUninstallUpdateTest
Ensures that update hook uninstalls Stable when it's no longer needed.

Namespace

Drupal\Tests\system\Functional\Update

Code

public function testUpdate() {
    
    /** @var \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler */
    $theme_handler = $this->container
        ->get('theme_handler');
    $this->assertTrue($theme_handler->themeExists('stable'));
    $this->assertTrue($theme_handler->themeExists('seven'));
    $this->runUpdates();
    // Ensure that Stable is not installed after running updates.
    $theme_handler->refreshInfo();
    $this->assertFalse($theme_handler->themeExists('stable'));
    $this->assertTrue($theme_handler->themeExists('seven'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.