function GenerateCommandsKernelTest::testMissingModule

A command refuses to run without the modules that it needs.

File

devel_generate/tests/src/Kernel/GenerateCommandsKernelTest.php, line 162

Class

GenerateCommandsKernelTest
Tests the devel_generate commands.

Namespace

Drupal\Tests\devel_generate\Kernel

Code

public function testMissingModule() : void {
  $this->expectException(\RuntimeException::class);
  $this->expectExceptionMessage('Install these modules first: media');
  $this->runCommand(GenerateMediaCommand::class);
}