function DevelHookCommandTest::runCommand

Runs the command non-interactively and asserts that it succeeded.

4 calls to DevelHookCommandTest::runCommand()
DevelHookCommandTest::testErrors in tests/src/Kernel/DevelHookCommandTest.php
Unknown hooks and implementations are errors.
DevelHookCommandTest::testImplementation in tests/src/Kernel/DevelHookCommandTest.php
An implementation is found by module name or by method name.
DevelHookCommandTest::testInstallFile in tests/src/Kernel/DevelHookCommandTest.php
A procedural hook in a .install file is found.
DevelHookCommandTest::testList in tests/src/Kernel/DevelHookCommandTest.php
Without an implementation, all of them are listed.

File

tests/src/Kernel/DevelHookCommandTest.php, line 123

Class

DevelHookCommandTest
Tests the devel:hook command.

Namespace

Drupal\Tests\devel\Kernel

Code

protected function runCommand(array $input) : CommandTester {
  $tester = new CommandTester($this->command());
  $code = $tester->execute($input, [
    'interactive' => FALSE,
  ]);
  $this->assertSame(Command::SUCCESS, $code, $tester->getDisplay());
  return $tester;
}