private static function createShipmentsView(order $seoOrder)
 {
     $shipments = $seoOrder->shipments;
     $robinShipments = Shipments::make();
     foreach ($shipments as $shipment) {
         $robinShipments->push(Shipment::make($shipment->getEditUrl($seoOrder->id), $shipment->status));
     }
     return $robinShipments;
 }
Example #2
0
 public function testAddsShipmentsToDetailsView()
 {
     $robinOrder = $this->getRobinOrder();
     $shipments = Shipments::make();
     $shipments->push(Shipment::make("#", "Shipped"));
     $robinOrder->detailsView->addRows($shipments, "Shipments");
     $shipmentsView = $robinOrder->detailsView->get(1);
     $this->assertInstanceOf(DetailViewItem::class, $shipmentsView);
     $this->assertArrayHasKey("display_as", $shipmentsView->toArray());
     $this->assertEquals("rows", $shipmentsView->displayAs);
 }