Made CartItem implement Jsonable, so it can be cast to json by laravel when building a response

This commit is contained in:
Rob Gloudemans
2017-05-21 16:38:33 +02:00
parent eca90e3287
commit 39de887e09
3 changed files with 79 additions and 14 deletions

View File

@@ -66,7 +66,6 @@ class CartTest extends TestCase
});
}
/** @test */
public function it_has_a_default_instance()
{
@@ -489,7 +488,7 @@ class CartTest extends TestCase
'price' => 10.00,
'tax' => 2.10,
'subtotal' => 10.0,
'options' => new CartItemOptions,
'options' => [],
],
'370d08585360f5c568b18d1f2e4ca1df' => [
'rowId' => '370d08585360f5c568b18d1f2e4ca1df',
@@ -499,7 +498,7 @@ class CartTest extends TestCase
'price' => 10.00,
'tax' => 2.10,
'subtotal' => 10.0,
'options' => new CartItemOptions,
'options' => [],
]
], $content->toArray());
}