public function testGetPrice() { $product1 = new ShopProduct('Мастер и маргарита', 'Михаил', 'Булгаков', '10.20'); $this->assertEquals(true, is_float($product1->getPrice())); }
public function sale(ShopProduct $product, $sale) { return $product->getPrice() - $product->getPrice() * $sale; }