/**
  * @Then this order should not exist in the registry
  */
 public function orderShouldNotExistInTheRegistry()
 {
     $orderId = $this->sharedStorage->get('order_id');
     $order = $this->orderRepository->find($orderId);
     Assert::null($order);
 }
 function it_throws_an_exception_if_order_still_exists(OrderRepositoryInterface $orderRepository, OrderInterface $order)
 {
     $order->getId()->willReturn(1);
     $orderRepository->find(1)->willReturn($order);
     $this->shouldThrow(NotEqualException::class)->during('orderShouldNotExistInTheRegistry', [$order]);
 }
Example #3
0
 /**
  * @Then /^([^"]+) should not exist in the registry$/
  */
 public function orderShouldNotExistInTheRegistry(OrderInterface $order)
 {
     /** @var OrderInterface $order */
     $order = $this->orderRepository->find($order->getId());
     expect($order)->toBe(null);
 }