function ClassyUninstallUpdateTest::testUpdate

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

File

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

Class

ClassyUninstallUpdateTest
Ensures that update hook uninstalls Classy 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('classy'));
    $this->assertTrue($theme_handler->themeExists('seven'));
    $this->runUpdates();
    // Ensure that Classy is not installed after running updates.
    $theme_handler->refreshInfo();
    $this->assertFalse($theme_handler->themeExists('classy'));
    $this->assertTrue($theme_handler->themeExists('seven'));
}

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