|
9 | 9 | use Magento\Framework\Api\SearchCriteriaBuilder;
|
10 | 10 | use Magento\Framework\App\ObjectManager;
|
11 | 11 | use Magento\Sales\Api\Data\OrderInterface;
|
| 12 | +use Magento\Sales\Api\Data\OrderStatusHistoryInterface; |
12 | 13 | use Magento\Sales\Api\OrderRepositoryInterface;
|
| 14 | +use Magento\Sales\Model\Order; |
13 | 15 | use Magento\Signifyd\Api\CaseRepositoryInterface;
|
14 | 16 | use Magento\Signifyd\Model\SignifydGateway\ApiCallException;
|
15 | 17 | use Magento\Signifyd\Model\SignifydGateway\ApiClient;
|
@@ -184,6 +186,19 @@ public function testCreateForOrder()
|
184 | 186 | $caseEntity->getGuaranteeDisposition(),
|
185 | 187 | 'Signifyd guaranty status in sales_order_grid table does not match case entity guaranty status'
|
186 | 188 | );
|
| 189 | + |
| 190 | + /** @var OrderRepositoryInterface $orderRepository */ |
| 191 | + $orderRepository = $this->objectManager->get(OrderRepositoryInterface::class); |
| 192 | + $order = $orderRepository->get($caseEntity->getOrderId()); |
| 193 | + static::assertEquals(Order::STATE_HOLDED, $order->getState()); |
| 194 | + |
| 195 | + $histories = $order->getStatusHistories(); |
| 196 | + static::assertNotEmpty($histories); |
| 197 | + |
| 198 | + /** @var OrderStatusHistoryInterface $orderHoldComment */ |
| 199 | + $orderHoldComment = array_pop($histories); |
| 200 | + static::assertInstanceOf(OrderStatusHistoryInterface::class, $orderHoldComment); |
| 201 | + static::assertEquals("Awaiting the Signifyd guarantee disposition.", $orderHoldComment->getComment()); |
187 | 202 | }
|
188 | 203 |
|
189 | 204 | /**
|
|
0 commit comments