public function StableUninstallUpdateTest::testUpdate in Drupal 9
Ensures that Stable is disabled if it's no longer needed.
File
- core/
modules/ system/ tests/ src/ Functional/ Update/ StableUninstallUpdateTest.php, line 27
Class
- StableUninstallUpdateTest
- Ensures that update hook uninstalls Stable when it's no longer needed.
Namespace
Drupal\Tests\system\Functional\UpdateCode
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'));
}