code cleanup (#3338)

This commit is contained in:
Kevin Papst
2022-05-31 18:08:41 +02:00
committed by GitHub
parent 88bf534573
commit 3f827b3104
5 changed files with 45 additions and 52 deletions

View File

@@ -24,15 +24,19 @@ class ResetTestCommandTest extends KernelTestCase
{
$kernel = self::bootKernel();
$application = new Application($kernel);
$application->add(new ResetTestCommand('test', $this->createMock(EntityManagerInterface::class)));
$application->add(new ResetTestCommand($this->createMock(EntityManagerInterface::class)));
self::assertTrue($application->has('kimai:reset-test'));
$command = $application->find('kimai:reset-test');
self::assertInstanceOf(ResetTestCommand::class, $command);
}
public function testCommandNameIsNotEnabledInProd()
{
$command = new ResetTestCommand('prod', $this->createMock(EntityManagerInterface::class));
self::assertFalse($command->isEnabled());
$kernel = self::bootKernel(['environment' => 'prod']);
$application = new Application($kernel);
$application->add(new ResetTestCommand($this->createMock(EntityManagerInterface::class)));
self::assertFalse($application->has('kimai:reset-test'));
}
}