Refactor test, fixing the constructor

This commit is contained in:
Julien Fastré 2024-04-17 10:36:13 +02:00
parent 7c1f3b114d
commit 4c89a954fa
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB

View File

@ -16,7 +16,7 @@ use Chill\PersonBundle\Repository\PersonACLAwareRepositoryInterface;
use Chill\TicketBundle\Action\Ticket\AssociateByPhonenumberCommand;
use Chill\TicketBundle\Action\Ticket\Handler\AssociateByPhonenumberCommandHandler;
use Chill\TicketBundle\Entity\Ticket;
use Doctrine\Persistence\ObjectManager;
use Doctrine\ORM\EntityManagerInterface;
use libphonenumber\PhoneNumberUtil;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
@ -35,13 +35,13 @@ class AssociateByPhonenumberCommandHandlerTest extends TestCase
private function getHandler(
PersonACLAwareRepositoryInterface $personACLAwareRepository,
): AssociateByPhonenumberCommandHandler {
$objectManager = $this->prophesize(ObjectManager::class);
$entityManager = $this->prophesize(EntityManagerInterface::class);
return new AssociateByPhonenumberCommandHandler(
$personACLAwareRepository,
PhoneNumberUtil::getInstance(),
new MockClock(),
$objectManager->reveal()
$entityManager->reveal()
);
}