function ExtensionInstallCommandTest::testCannotMixModulesAndThemes

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/src/Kernel/Command/ExtensionInstallCommandTest.php \Drupal\Tests\system\Kernel\Command\ExtensionInstallCommandTest::testCannotMixModulesAndThemes()

Tests that modules and themes cannot be installed in the same invocation.

File

core/modules/system/tests/src/Kernel/Command/ExtensionInstallCommandTest.php, line 183

Class

ExtensionInstallCommandTest
Tests the 'ex:install' command.

Namespace

Drupal\Tests\system\Kernel\Command

Code

public function testCannotMixModulesAndThemes() : void {
  $tester = $this->commandTester();
  $code = $tester->execute([
    'extensions' => 'console_test,test_subtheme',
  ]);
  $this->assertEquals(Command::FAILURE, $code);
  $this->assertStringContainsString('Cannot install modules', $tester->getDisplay());
  $this->assertFalse($this->moduleInstalled('console_test'));
}

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