mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-11 18:54:33 +00:00
Update CartItemTest.php
This commit is contained in:
@@ -26,7 +26,7 @@ class CartItemTest extends TestCase
|
|||||||
/** @test */
|
/** @test */
|
||||||
public function it_can_be_cast_to_an_array()
|
public function it_can_be_cast_to_an_array()
|
||||||
{
|
{
|
||||||
$cartItem = new CartItem(1, 'Some item', new Money(10.00, new Currency('USD')), 550, 2, new CartItemOptions(['size' => 'XL', 'color' => 'red']));
|
$cartItem = new CartItem(1, 'Some item', new Money(1000, new Currency('USD')), 550, 2, new CartItemOptions(['size' => 'XL', 'color' => 'red']));
|
||||||
|
|
||||||
$this->assertEquals([
|
$this->assertEquals([
|
||||||
'id' => 1,
|
'id' => 1,
|
||||||
@@ -48,7 +48,7 @@ class CartItemTest extends TestCase
|
|||||||
/** @test */
|
/** @test */
|
||||||
public function it_can_be_cast_to_json()
|
public function it_can_be_cast_to_json()
|
||||||
{
|
{
|
||||||
$cartItem = new CartItem(1, 'Some item', new Money(10.00, new Currency('USD')), 550, 2, new CartItemOptions(['size' => 'XL', 'color' => 'red']));
|
$cartItem = new CartItem(1, 'Some item', new Money(1000, new Currency('USD')), 550, 2, new CartItemOptions(['size' => 'XL', 'color' => 'red']));
|
||||||
|
|
||||||
$this->assertJson($cartItem->toJson());
|
$this->assertJson($cartItem->toJson());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user