Example #1
0
 /**
  * @coversNothing
  */
 public function testIntegration()
 {
     $purchaseItem = PurchaseItem::find(1);
     $order = Purchase::find(1);
     $purchase = StorePurchase::find(1);
     $this->assertSame($order, $purchaseItem->getPurchase());
     $this->assertSame($purchase, $purchaseItem->getStorePurchase());
 }
Example #2
0
 /**
  * @coversNothing
  */
 public function testIntegration()
 {
     $purchase = Purchase::find(1);
     $item1 = PurchaseItem::find(1);
     $item2 = PurchaseItem::find(2);
     $item3 = PurchaseItem::find(3);
     $item4 = PurchaseItem::find(4);
     $storePurchase1 = StorePurchase::find(1);
     $storePurchase2 = StorePurchase::find(2);
     $billing = Address::find(1);
     $items = $purchase->getItems();
     $this->assertSame([$item1, $item2, $item3, $item4], $purchase->getItems()->toArray());
     $this->assertSame([$storePurchase1, $storePurchase2], $purchase->getStorePurchases()->toArray());
     $this->assertSame($billing, $purchase->getBilling());
 }