/** * @Then /^(the administrator) should see that (order placed by "[^"]+") has "([^"]+)" currency$/ */ public function theAdministratorShouldSeeThatThisOrderHasBeenPlacedIn(AdminUserInterface $user, OrderInterface $order, $currency) { $this->sharedSecurityService->performActionAsAdminUser($user, function () use($order, $currency) { $this->showPage->open(['id' => $order->getId()]); Assert::same($this->showPage->getOrderCurrency(), $currency, 'The order has been placed in %s, but it was expected to be placed in %s'); }); }
/** * @Then /^(the administrator) should know about (this additional note) for (this order made by "[^"]+")$/ */ public function theCustomerServiceShouldKnowAboutThisAdditionalNotes(AdminUserInterface $user, $note, OrderInterface $order) { $this->sharedSecurityService->performActionAsAdminUser($user, function () use($note, $order) { $this->showPage->open(['id' => $order->getId()]); Assert::true($this->showPage->hasNote($note), sprintf('I should see %s note, but I do not see', $note)); }); }
/** * @When I delete the order :order */ public function iDeleteOrder(OrderInterface $order) { $this->sharedStorage->set('order', $order); $this->showPage->open(['id' => $order->getId()]); $this->showPage->deleteOrder(); }