diff --git a/tests/Behat/Page/Admin/OrderRefundsPage.php b/tests/Behat/Page/Admin/OrderRefundsPage.php index 8752d29d..362eb588 100644 --- a/tests/Behat/Page/Admin/OrderRefundsPage.php +++ b/tests/Behat/Page/Admin/OrderRefundsPage.php @@ -37,12 +37,12 @@ public function pickUnitWithProductToRefund(string $productName, int $unitNumber $value = $units[$unitNumber]->find('css','td:nth-child(2)'); - $refunded = substr($this->getUnitRefundedTotal($value), 1); + $refunded = (double) substr($this->getUnitRefundedTotal($value), 1); $total = substr($this->getUnitTotal($value), 1); /** @var double $total */ - $total = $total - $refunded; + $total -= $refunded; $units[$unitNumber]->find('css','td:nth-child(3) input')->setValue($total); } @@ -68,7 +68,7 @@ public function pickOrderShipment(?string $shippingMethodName = null): void if ($this->getUnitRefundedTotal($orderShipment) !== null) { $refunded = $this->getUnitRefundedTotal($orderShipment); - $total = substr($total, 1) - substr($refunded, 1); + $total = (double) substr($total, 1) - (double) substr($refunded, 1); } $orderShipment->find('css','td:nth-child(3) input')->setValue($total);