Release 2.24 (#5097)

This commit is contained in:
Kevin Papst
2024-10-11 21:56:54 +02:00
committed by GitHub
parent 5fac6a642c
commit ff9bf163ee
32 changed files with 381 additions and 463 deletions

View File

@@ -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());
}
}