Skip to content

Commit

Permalink
test: activate order mode tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joerivanveen committed Jan 18, 2024
1 parent 3be3816 commit 66b7012
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions test/Model/Fulfilment/OrderCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -83,6 +74,7 @@ public function testSave(): void
$orderLines = $this->generateOrderLines(3);

$order->setOrderLines($orderLines);
$order->setWeight($orderLines->sum('weight'));
$orderCollection->push($order);
}

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 66b7012

Please sign in to comment.