/** * 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; }
/** @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); }