Author: Paweł Jędrzejewski (pawel@sylius.org)
Author: Grzegorz Sadowski (grzegorz.sadowski@lakion.com)
Inheritance: extends Sylius\Behat\Page\SymfonyPageInterface
Example #1
0
 /**
  * @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');
     });
 }
Example #2
0
 /**
  * @Then /^(the administrator) should know about (this additional note) for (this order made by "[^"]+")$/
  */
 public function theCustomerServiceShouldKnowAboutThisAdditionalNotes(UserInterface $user, $note, OrderInterface $order)
 {
     $this->securityService->performActionAs($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));
     });
 }
Example #3
0
 /**
  * @Then I should see :provinceName ad province in the billing address
  */
 public function iShouldSeeAdProvinceInTheBillingAddress($provinceName)
 {
     Assert::true($this->showPage->hasBillingProvinceName($provinceName), sprintf('Cannot find shipping address with province %s', $provinceName));
 }
Example #4
0
 /**
  * @Then its state should be :state
  */
 public function itsStateShouldBe($state)
 {
     Assert::same($this->showPage->getOrderState(), $state, 'The order state should be %2$s, but it is %s.');
 }
 /**
  * @Then /^there should be(?:| only) (\d+) payments?$/
  */
 public function theOrderShouldHaveNumberOfPayments($number)
 {
     $actualNumberOfPayments = $this->showPage->getPaymentsCount();
     Assert::eq($number, $actualNumberOfPayments);
 }