add load profile and countries serving to carrier

This commit is contained in:
Yisroel Baum 2025-11-11 20:43:18 +02:00
parent cce5e296c6
commit 3be8eee948
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
6 changed files with 37 additions and 0 deletions

View file

@ -16,6 +16,8 @@ class CreateCarrierTest extends TestCase
$contactPerson = 'Joe Shmoe';
$phoneNumber = '132456798';
$notes = 'some notes';
$loadProfile = 'LTL/FTL'; // Less than full trailer load and full trailer load
$countriesServing = ['USA', 'FRA', 'UK'];
$carrierRepo = new FakeCarrierRepository();
$dto = new CreateCarrierRequest(
$email,
@ -23,6 +25,8 @@ class CreateCarrierTest extends TestCase
$contactPerson,
$phoneNumber,
$notes,
$loadProfile,
$countriesServing,
);
$useCase = new CreateCarrier($dto, $carrierRepo);
$response = $useCase->execute();
@ -32,5 +36,7 @@ class CreateCarrierTest extends TestCase
$this->assertEquals($contactPerson, $foundCarrier->getContactPerson());
$this->assertEquals($phoneNumber, $foundCarrier->getPhoneNumber());
$this->assertEquals($notes, $foundCarrier->getNotes());
$this->assertEquals($loadProfile, $foundCarrier->getLoadProfile());
$this->assertEquals($countriesServing, $foundCarrier->getCountriesServing());
}
}

View file

@ -16,6 +16,8 @@ class GetAllCarriersTest extends TestCase
$contactPerson = 'joe shmoe';
$phoneNumber = '123456798';
$notes = 'some notes';
$loadProfile = 'LTL/FTL';
$countriesServing = ['USA', 'FRA', 'UK'];
$repo = new FakeCarrierRepository();
$repo->save(new Carrier(
0,
@ -24,6 +26,8 @@ class GetAllCarriersTest extends TestCase
$contactPerson,
$phoneNumber,
$notes,
$loadProfile,
$countriesServing,
));
$useCase = new GetAllCarriers($repo);
$response = $useCase->execute();
@ -35,6 +39,8 @@ class GetAllCarriersTest extends TestCase
$contactPerson,
$phoneNumber,
$notes,
$loadProfile,
$countriesServing,
)],
$response
);