Exemplo n.º 1
0
 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!');
     }
 }
Exemplo n.º 2
0
 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());
 }
Exemplo n.º 3
0
 protected function commonAsserts(Order $order)
 {
     $this->assertSame('111111', $order->getOrderNumber());
     $this->assertSame('111111', $order->getId());
     $this->assertSame(1, $order->getShipping()->getShippingCode());
 }