function ExtensionUninstallCommandTest::testDefaultThemeFails
Tests that the default theme cannot be uninstalled.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Extension/ Command/ ExtensionUninstallCommandTest.php, line 183
Class
- ExtensionUninstallCommandTest
- Tests the 'ex:uninstall' command.
Namespace
Drupal\KernelTests\Core\Extension\CommandCode
public function testDefaultThemeFails() : void {
$this->config('system.theme')
->set('default', 'test_subtheme')
->save();
$tester = $this->commandTester();
$code = $tester->execute([
'extensions' => 'test_subtheme',
]);
$this->assertEquals(Command::FAILURE, $code);
$this->assertStringContainsString('cannot be uninstalled', $tester->getDisplay());
$this->assertTrue($this->themeInstalled('test_subtheme'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.