public function MollieApiMock::isCancelled in Commerce Mollie 8
Mocks the isCancelled() method for testing.
Return value
bool TRUE when order-total is 59.98 (2 x 29.99) USD.
1 call to MollieApiMock::isCancelled()
- MollieApiMock::__get in tests/
modules/ commerce_mollie_tests/ src/ Services/ MollieApiMock.php - Magic method that passes every _get to the parent object.
File
- tests/
modules/ commerce_mollie_tests/ src/ Services/ MollieApiMock.php, line 158
Class
- MollieApiMock
- Mock class.
Namespace
Drupal\commerce_mollie_tests\ServicesCode
public function isCancelled() {
/** @var \Drupal\commerce_order\Entity\Order $commerce_order */
$commerce_order = $this->commerceOrderStorage
->load(1);
/** @var \Drupal\commerce_price\Price $balance */
$balance = $commerce_order
->getBalance();
return $balance
->getNumber() === '59.98';
}