Add priceTotal to CartItemTest

This commit is contained in:
Patrick Henninger
2020-08-29 16:28:28 +02:00
parent e5b93829c5
commit 57d73f32b3

View File

@@ -55,4 +55,13 @@ class CartItemTest extends TestCase
$this->assertEquals($json, $cartItem->toJson());
}
/** @test */
public function it_formats_price_total_correctly()
{
$cartItem = new CartItem(1, 'Some item', 10.00, 550, ['size' => 'XL', 'color' => 'red']);
$cartItem->setQuantity(2);
$this->assertSame('20.00', $cartItem->priceTotal());
}
}