コード例 #1
0
 /**
  * Price:    £15.00
  * Rate:     0%
  * Quantity: 1
  * Freebie:  false
  * Taxable:  false
  * Discount: £0
  * Delivery: £0
  *
  * @return Product
  */
 public function one()
 {
     $sku = '1';
     $name = 'The 4-Hour Work Week';
     $rate = new UnitedKingdomValueAddedTax();
     $price = new Money(1500, new Currency('GBP'));
     $product = new Product($sku, $name, $price, $rate);
     $product->category(new PhysicalBook());
     return $product;
 }
コード例 #2
0
ファイル: ProductTest.php プロジェクト: philipbrown/basket
 /** @test */
 public function should_categorise_a_product()
 {
     $this->product->category(new PhysicalBook());
     $this->assertInstanceOf('PhilipBrown\\Basket\\Categories\\PhysicalBook', $this->product->category);
     $this->assertFalse($this->product->taxable);
 }