From 8b9335fb5bc1bf99c99dddea4baa83bf1d1860bb Mon Sep 17 00:00:00 2001 From: Patrick Date: Sat, 5 Feb 2022 19:20:40 +0100 Subject: [PATCH] Update CartItemTest.php --- tests/CartItemTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/CartItemTest.php b/tests/CartItemTest.php index 7f99ec2..3823296 100644 --- a/tests/CartItemTest.php +++ b/tests/CartItemTest.php @@ -3,6 +3,7 @@ namespace Gloudemans\Tests\Shoppingcart; use Gloudemans\Shoppingcart\CartItem; +use Gloudemans\Shoppingcart\CartItemOptions; use Gloudemans\Shoppingcart\ShoppingcartServiceProvider; use Orchestra\Testbench\TestCase; use Money\Money; @@ -25,7 +26,7 @@ class CartItemTest extends TestCase /** @test */ public function it_can_be_cast_to_an_array() { - $cartItem = new CartItem(1, 'Some item', new Money(10.00, new Currency('USD')), 550, 2, ['size' => 'XL', 'color' => 'red']); + $cartItem = new CartItem(1, 'Some item', new Money(10.00, new Currency('USD')), 550, 2, new CartItemOptions(['size' => 'XL', 'color' => 'red'])); $this->assertEquals([ 'id' => 1, @@ -47,7 +48,7 @@ class CartItemTest extends TestCase /** @test */ public function it_can_be_cast_to_json() { - $cartItem = new CartItem(1, 'Some item', new Money(10.00, new Currency('USD')), 550, 2, ['size' => 'XL', 'color' => 'red']); + $cartItem = new CartItem(1, 'Some item', new Money(10.00, new Currency('USD')), 550, 2, new CartItemOptions(['size' => 'XL', 'color' => 'red'])); $this->assertJson($cartItem->toJson());