application = new Application($kernel); $container = self::$kernel->getContainer(); /** @var Registry $doctrine */ $doctrine = $container->get('doctrine'); $this->application->add(new InstallCommand( $doctrine->getConnection() // @phpstan-ignore argument.type )); } public function testCommandName(): void { $command = $this->application->find('kimai:install'); self::assertInstanceOf(InstallCommand::class, $command); } }