Skip to content

Commit

Permalink
tests: updated php specs
Browse files Browse the repository at this point in the history
  • Loading branch information
danigargar committed Jun 10, 2024
1 parent adf1f45 commit f04b4e9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions library/spec/Ivoz/Provider/Domain/Model/Friend/FriendSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
use Ivoz\Provider\Domain\Model\Domain\DomainInterface;
use Ivoz\Provider\Domain\Model\Friend\Friend;
use Ivoz\Provider\Domain\Model\Friend\FriendDto;
use Ivoz\Provider\Domain\Model\ProxyUser\ProxyUser;
use Ivoz\Provider\Domain\Model\ProxyUser\ProxyUserDto;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use spec\HelperTrait;
Expand Down Expand Up @@ -47,6 +49,14 @@ function let(
]
);

$proxyUserDto = new ProxyUserDto();
$proxyUser = $this->getterProphecy(
$this->getTestDouble(ProxyUser::class),
[
'getId' => 1,
]
);

$this->dto = $dto = new FriendDto();
$dto->setName('Name')
->setDescription('Desc')
Expand All @@ -60,10 +70,12 @@ function let(
->setCalleridUpdateHeader('rpid')
->setUpdateCallerid('yes')
->setDirectConnectivity('yes')
->setProxyUser($proxyUserDto)
->setCompany($companyDto);

$this->transformer = new DtoToEntityFakeTransformer([
[$companyDto, $company->reveal()],
[$proxyUserDto, $proxyUser->reveal()],
]);

$this->beConstructedThrough(
Expand Down

0 comments on commit f04b4e9

Please sign in to comment.