diff --git a/test/Model/Fulfilment/OrderCollectionTest.php b/test/Model/Fulfilment/OrderCollectionTest.php index 806f7b64..6add023c 100644 --- a/test/Model/Fulfilment/OrderCollectionTest.php +++ b/test/Model/Fulfilment/OrderCollectionTest.php @@ -32,15 +32,6 @@ class OrderCollectionTest extends TestCase 'street' => 'Telderskade', ]; - /** - * @return void - * @before - */ - public function before(): void - { - self::skipUnlessEnabled(self::ENV_TEST_ORDERS, 'The Order API is not available on production yet.'); - } - /** * @throws \MyParcelNL\Sdk\src\Exception\AccountNotActiveException * @throws \MyParcelNL\Sdk\src\Exception\ApiException @@ -83,6 +74,7 @@ public function testSave(): void $orderLines = $this->generateOrderLines(3); $order->setOrderLines($orderLines); + $order->setWeight($orderLines->sum('weight')); $orderCollection->push($order); } @@ -112,13 +104,15 @@ static function (Order $savedOrder) use (&$i, $orderCollection) { $originalOrder->getInvoiceAddress() ->toArray(), $savedOrder->getInvoiceAddress() - ->toArray() + ->toArray(), + 'invoice address is not the same' ); self::assertArraySame( $originalOrder->getRecipient() ->toArray(), $savedOrder->getRecipient() - ->toArray() + ->toArray(), + 'recipient is not the same' ); $savedOrder