Ajout du statut opening / closed pour la liste des tickets

This commit is contained in:
2025-07-08 13:48:43 +00:00
parent cfba291f2c
commit 7506b918d7
9 changed files with 162 additions and 6 deletions

View File

@@ -12,6 +12,7 @@ declare(strict_types=1);
namespace Chill\TicketBundle\Tests\Repository;
use Chill\PersonBundle\DataFixtures\Helper\RandomPersonHelperTrait;
use Chill\TicketBundle\Entity\StateEnum;
use Chill\TicketBundle\Repository\TicketACLAwareRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
@@ -63,4 +64,18 @@ class TicketACLAwareRepositoryTest extends KernelTestCase
self::assertIsInt($result);
}
public function testCountTicketByCurrentStateSingleState(): void
{
$result = $this->repository->countTickets(['byCurrentState' => [StateEnum::OPEN]]);
self::assertIsInt($result);
}
public function testFindTicketByCurrentStateMultipleState(): void
{
$result = $this->repository->countTickets(['byCurrentState' => [StateEnum::OPEN, StateEnum::CLOSED]]);
self::assertIsInt($result);
}
}