function ExtensionInstallCommandTest::testThemeInstall
Same name in this branch
- 11.x core/tests/Drupal/KernelTests/Core/Extension/Command/ExtensionInstallCommandTest.php \Drupal\KernelTests\Core\Extension\Command\ExtensionInstallCommandTest::testThemeInstall()
Same name and namespace in other branches
- main core/modules/system/tests/src/Kernel/Command/ExtensionInstallCommandTest.php \Drupal\Tests\system\Kernel\Command\ExtensionInstallCommandTest::testThemeInstall()
- main core/tests/Drupal/KernelTests/Core/Extension/Command/ExtensionInstallCommandTest.php \Drupal\KernelTests\Core\Extension\Command\ExtensionInstallCommandTest::testThemeInstall()
Tests installing a theme and its base theme dependency.
File
-
core/
modules/ system/ tests/ src/ Kernel/ Command/ ExtensionInstallCommandTest.php, line 144
Class
- ExtensionInstallCommandTest
- Tests the 'ex:install' command.
Namespace
Drupal\Tests\system\Kernel\CommandCode
public function testThemeInstall() : void {
$tester = $this->commandTester();
$code = $tester->execute([
'extensions' => 'test_subtheme',
'--yes' => TRUE,
]);
$display = $tester->getDisplay();
$this->assertEquals(Command::SUCCESS, $code);
$this->assertStringContainsString('test_base_theme', $display);
$this->assertTrue($this->themeInstalled('test_subtheme'));
$this->assertTrue($this->themeInstalled('test_base_theme'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.