change freight orders to freight order ids
This commit is contained in:
parent
b58d23f084
commit
dbed2a9acc
3 changed files with 8 additions and 8 deletions
|
|
@ -13,7 +13,7 @@ class Carrier
|
||||||
private string $notes,
|
private string $notes,
|
||||||
private string $loadProfile,
|
private string $loadProfile,
|
||||||
private array $countriesServing,
|
private array $countriesServing,
|
||||||
private array $freightOrders,
|
private array $freightOrderIds,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
|
|
@ -61,8 +61,8 @@ class Carrier
|
||||||
return $this->countriesServing;
|
return $this->countriesServing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFreightOrders(): array
|
public function getFreightOrderIds(): array
|
||||||
{
|
{
|
||||||
return $this->freightOrders;
|
return $this->freightOrderIds;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ class FakeCarrierRepository implements CarrierRepository
|
||||||
$carrier->getNotes(),
|
$carrier->getNotes(),
|
||||||
$carrier->getLoadProfile(),
|
$carrier->getLoadProfile(),
|
||||||
$carrier->getCountriesServing(),
|
$carrier->getCountriesServing(),
|
||||||
$carrier->getFreightOrders(),
|
$carrier->getFreightOrderIds(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -51,7 +51,7 @@ class FakeCarrierRepository implements CarrierRepository
|
||||||
$carrier->getNotes(),
|
$carrier->getNotes(),
|
||||||
$carrier->getLoadProfile(),
|
$carrier->getLoadProfile(),
|
||||||
$carrier->getCountriesServing(),
|
$carrier->getCountriesServing(),
|
||||||
$carrier->getFreightOrders(),
|
$carrier->getFreightOrderIds(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -72,7 +72,7 @@ class FakeCarrierRepository implements CarrierRepository
|
||||||
$carrier->getNotes(),
|
$carrier->getNotes(),
|
||||||
$carrier->getLoadProfile(),
|
$carrier->getLoadProfile(),
|
||||||
$carrier->getCountriesServing(),
|
$carrier->getCountriesServing(),
|
||||||
$carrier->getFreightOrders(),
|
$carrier->getFreightOrderIds(),
|
||||||
);
|
);
|
||||||
}, $this->existingCarriers);
|
}, $this->existingCarriers);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ class CreateFreightOrderTest extends TestCase
|
||||||
notes: 'some notes',
|
notes: 'some notes',
|
||||||
loadProfile: 'LTL/FTL',
|
loadProfile: 'LTL/FTL',
|
||||||
countriesServing: ['USA'],
|
countriesServing: ['USA'],
|
||||||
freightOrders: [],
|
freightOrderIds: [],
|
||||||
));
|
));
|
||||||
$dto = new CreateFreightOrderRequestDTO(
|
$dto = new CreateFreightOrderRequestDTO(
|
||||||
shipFrom: 'ny',
|
shipFrom: 'ny',
|
||||||
|
|
@ -78,7 +78,7 @@ class CreateFreightOrderTest extends TestCase
|
||||||
$foundCarrier = $this->carrierRepo->find($carrierId);
|
$foundCarrier = $this->carrierRepo->find($carrierId);
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
[$createdFreightOrder->getId()],
|
[$createdFreightOrder->getId()],
|
||||||
$foundCarrier->getOrderIds()
|
$foundCarrier->getFreightOrderIds()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue