protected function resolvePrevious(Order $entity) { try { $o = $this->findById($entity->getId()); if ($o instanceof Order) { return $o; } } catch (\Exception $o) { throw new \Exception('Order #' . $entity->getId() . ' not found on marketplace!'); } }
public function displayOrder(Order $order, OutputInterface $output) { $output->writeln('Order #<comment>' . $order->getId() . '</comment>'); $this->displayTableResults($output, [$order->toLog()]); $this->displayTableResults($output, $order->getShipping()->getCustomer()->toLog()); $this->displayTableResults($output, [$order->getShipping()->getInvoice()->toArray()]); $this->displayTableResults($output, [$order->getShipping()->getTransport()->toArray()]); $this->displayTableResults($output, $order->getShipping()->getItems()->toLog()); }
protected function commonAsserts(Order $order) { $this->assertSame('111111', $order->getOrderNumber()); $this->assertSame('111111', $order->getId()); $this->assertSame(1, $order->getShipping()->getShippingCode()); }