move dto from constructor to method paramour

in create carrier use case
This commit is contained in:
Yisroel Baum 2025-11-18 09:15:40 +02:00
parent 18e43b3bac
commit 908baee2a7
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
2 changed files with 10 additions and 11 deletions

View file

@ -28,8 +28,8 @@ class CreateCarrierTest extends TestCase
$loadProfile,
$countriesServing,
);
$useCase = new CreateCarrier($dto, $carrierRepo);
$response = $useCase->execute();
$useCase = new CreateCarrier($carrierRepo);
$response = $useCase->execute($dto);
$foundCarrier = $carrierRepo->find($response->getId());
$this->assertEquals($email, $foundCarrier->getEmail());
$this->assertEquals($company, $foundCarrier->getCompanyName());