remove references of carrier and freight order ids from each other

They reference each other in created bid so these arrays are not necessary
This commit is contained in:
Yisroel Baum 2025-11-18 09:08:15 +02:00
parent e79064d909
commit 948380ba9f
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
6 changed files with 0 additions and 69 deletions

View file

@ -60,40 +60,6 @@ class CreateFreightOrderTest extends TestCase
$this->assertEquals($dto->loadDetails, $foundFreightOrder->getLoadDetails());
$this->assertEquals($dto->notes, $foundFreightOrder->getNotes());
$this->assertEquals($dto->fileAttachments, $foundFreightOrder->getFileAttachments());
$this->assertEquals($dto->carrierIds, $foundFreightOrder->getCarrierIds());
}
public function test_carrier_is_connected_to_order(): void
{
$carrierId = 0;
$this->carrierRepo->save(new Carrier(
id: $carrierId,
email: 'test@email.com',
companyName: 'company name',
contactPerson: 'person',
phoneNumber: '123456798',
notes: 'some notes',
loadProfile: 'LTL/FTL',
countriesServing: ['USA'],
freightOrderIds: [],
));
$dto = new CreateFreightOrderRequestDTO(
shipFrom: 'ny',
shipTo: 'nj',
pickupDate: new DateTime('+5 days'),
deliveryDeadline: new DateTime('+10 days'),
loadDetails: 'some details',
notes: 'some notes',
fileAttachments: ['path/to/file', 'another/path/file'],
carrierIds: [$carrierId],
);
$response = $this->useCase->execute($dto);
$createdFreightOrder = $response->freightOrder;
$foundCarrier = $this->carrierRepo->find($carrierId);
$this->assertEquals(
[$createdFreightOrder->getId()],
$foundCarrier->getFreightOrderIds()
);
}
public function test_email_is_sent(): void
@ -108,7 +74,6 @@ class CreateFreightOrderTest extends TestCase
notes: 'some notes',
loadProfile: 'LTL/FTL',
countriesServing: ['USA'],
freightOrderIds: [],
));
$dto = new CreateFreightOrderRequestDTO(
shipFrom: 'ny',
@ -136,7 +101,6 @@ class CreateFreightOrderTest extends TestCase
notes: 'some notes',
loadProfile: 'LTL/FTL',
countriesServing: ['USA'],
freightOrderIds: [],
));
$dto = new CreateFreightOrderRequestDTO(
shipFrom: 'ny',