예제 #1
0
 /**
  * @Then /^an email with shipment's details of (this order) should be sent to "([^"]+)"$/
  */
 public function anEmailWithShipmentDetailsOfOrderShouldBeSentTo(OrderInterface $order, $recipient)
 {
     $this->assertEmailContainsMessageTo($order->getNumber(), $recipient);
     $this->assertEmailContainsMessageTo($order->getLastShipment()->getMethod()->getName(), $recipient);
     $tracking = $this->sharedStorage->get('tracking_code');
     $this->assertEmailContainsMessageTo($tracking, $recipient);
 }
예제 #2
0
 /**
  * @When I view the summary of the order :order
  * @When /^I am viewing the summary of (this order)$/
  */
 public function iViewTheSummaryOfTheOrder(OrderInterface $order)
 {
     $this->orderShowPage->open(['number' => $order->getNumber()]);
 }
예제 #3
0
 /**
  * @Then /^(this order) should not exist in the registry$/
  */
 public function orderShouldNotExistInTheRegistry(OrderInterface $order)
 {
     $this->indexPage->open();
     Assert::false($this->indexPage->isSingleResourceOnPage(['number' => $order->getNumber()]), sprintf('Order with number %s exists but should not.', $order->getNumber()));
 }
예제 #4
0
파일: IndexPage.php 프로젝트: sylius/sylius
 /**
  * {@inheritDoc}
  */
 public function isItPossibleToChangePaymentMethodForOrder(OrderInterface $order)
 {
     $row = $this->tableAccessor->getRowWithFields($this->getElement('customer_orders'), ['number' => $order->getNumber()]);
     return $row->hasLink('Pay');
 }
예제 #5
0
 function it_throws_an_exception_if_order_still_exists(OrderRepositoryInterface $orderRepository, OrderInterface $order)
 {
     $order->getNumber()->willReturn('#00000000');
     $orderRepository->findOneBy(['number' => '#00000000'])->willReturn($order);
     $this->shouldThrow(NotEqualException::class)->during('orderShouldNotExistInTheRegistry', [$order]);
 }
예제 #6
0
 /**
  * @Given this order should have :order number
  */
 public function thisOrderShouldHaveNumber(OrderInterface $order)
 {
     Assert::true($this->orderIndexPage->isOrderWithNumberInTheList($order->getNumber()), sprintf('Cannot find order with number "%s" in the list.', $order->getNumber()));
 }