mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-14 14:24:24 +00:00
Refactor test, fixing the constructor
This commit is contained in:
parent
7c1f3b114d
commit
4c89a954fa
@ -16,7 +16,7 @@ use Chill\PersonBundle\Repository\PersonACLAwareRepositoryInterface;
|
|||||||
use Chill\TicketBundle\Action\Ticket\AssociateByPhonenumberCommand;
|
use Chill\TicketBundle\Action\Ticket\AssociateByPhonenumberCommand;
|
||||||
use Chill\TicketBundle\Action\Ticket\Handler\AssociateByPhonenumberCommandHandler;
|
use Chill\TicketBundle\Action\Ticket\Handler\AssociateByPhonenumberCommandHandler;
|
||||||
use Chill\TicketBundle\Entity\Ticket;
|
use Chill\TicketBundle\Entity\Ticket;
|
||||||
use Doctrine\Persistence\ObjectManager;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
use libphonenumber\PhoneNumberUtil;
|
use libphonenumber\PhoneNumberUtil;
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Prophecy\Argument;
|
use Prophecy\Argument;
|
||||||
@ -35,13 +35,13 @@ class AssociateByPhonenumberCommandHandlerTest extends TestCase
|
|||||||
private function getHandler(
|
private function getHandler(
|
||||||
PersonACLAwareRepositoryInterface $personACLAwareRepository,
|
PersonACLAwareRepositoryInterface $personACLAwareRepository,
|
||||||
): AssociateByPhonenumberCommandHandler {
|
): AssociateByPhonenumberCommandHandler {
|
||||||
$objectManager = $this->prophesize(ObjectManager::class);
|
$entityManager = $this->prophesize(EntityManagerInterface::class);
|
||||||
|
|
||||||
return new AssociateByPhonenumberCommandHandler(
|
return new AssociateByPhonenumberCommandHandler(
|
||||||
$personACLAwareRepository,
|
$personACLAwareRepository,
|
||||||
PhoneNumberUtil::getInstance(),
|
PhoneNumberUtil::getInstance(),
|
||||||
new MockClock(),
|
new MockClock(),
|
||||||
$objectManager->reveal()
|
$entityManager->reveal()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user