function DevelHookCommandTest::testList
Without an implementation, all of them are listed.
File
-
tests/
src/ Kernel/ DevelHookCommandTest.php, line 42
Class
- DevelHookCommandTest
- Tests the devel:hook command.
Namespace
Drupal\Tests\devel\KernelCode
public function testList() : void {
$tester = $this->runCommand([
'hook' => 'help',
]);
$hooks = (new \ReflectionClass(DevelHooks::class))->getFileName();
$this->assertStringContainsString($hooks . ':', $tester->getDisplay());
$this->assertGreaterThan(1, count(explode("\n", trim($tester->getDisplay()))));
}