Release 2.24 (#5097)
This commit is contained in:
@@ -13,6 +13,7 @@ use App\Command\ResetTestCommand;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
|
||||
|
||||
/**
|
||||
* @covers \App\Command\ResetTestCommand
|
||||
@@ -24,7 +25,11 @@ class ResetTestCommandTest extends KernelTestCase
|
||||
{
|
||||
$kernel = self::bootKernel();
|
||||
$application = new Application($kernel);
|
||||
$application->add(new ResetTestCommand($this->createMock(EntityManagerInterface::class), 'test'));
|
||||
$application->add(new ResetTestCommand(
|
||||
$this->createMock(EntityManagerInterface::class),
|
||||
$this->createMock(UserPasswordHasherInterface::class),
|
||||
'test'
|
||||
));
|
||||
|
||||
self::assertTrue($application->has('kimai:reset:test'));
|
||||
$command = $application->find('kimai:reset:test');
|
||||
@@ -33,7 +38,11 @@ class ResetTestCommandTest extends KernelTestCase
|
||||
|
||||
public function testCommandNameIsNotEnabledInProd(): void
|
||||
{
|
||||
$sut = new ResetTestCommand($this->createMock(EntityManagerInterface::class), 'prod');
|
||||
$sut = new ResetTestCommand(
|
||||
$this->createMock(EntityManagerInterface::class),
|
||||
$this->createMock(UserPasswordHasherInterface::class),
|
||||
'prod'
|
||||
);
|
||||
self::assertFalse($sut->isEnabled());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user