Fix format tests

This commit is contained in:
Patrick Henninger
2022-02-06 00:35:50 +01:00
parent a5c4c64294
commit 7c88f42ad5
2 changed files with 7 additions and 3 deletions

View File

@@ -40,6 +40,7 @@ class CartItemTest extends TestCase
],
'tax' => '0.00',
'subtotal' => '20.00',
'total' => '20.00',
'discount' => '0.00',
'weight' => 550,
], $cartItem->toArray());
@@ -52,7 +53,7 @@ class CartItemTest extends TestCase
$this->assertJson($cartItem->toJson());
$json = '{"rowId":"07d5da5550494c62daf9993cf954303f","id":1,"name":"Some item","qty":2,"price":"10.00","weight":550,"options":{"size":"XL","color":"red"},"discount":"0.00","tax":"10.00","subtotal":"20.00"}';
$json = '{"rowId":"07d5da5550494c62daf9993cf954303f","id":1,"name":"Some item","price":"10.00","qty":2,"weight":550,"options":{"size":"XL","color":"red"},"discount":"0.00","subtotal":"20.00","tax":"20.00","total":"40.00"}';
$this->assertEquals($json, $cartItem->toJson());
}

View File

@@ -533,11 +533,13 @@ class CartTest extends TestCase
'name' => 'Item name',
'qty' => 1,
'price' => '10.00',
'tax' => '2.10',
'subtotal' => '10.00',
'tax' => '2.10',
'total' => '7.90',
'options' => [],
'discount' => '0.00',
'weight' => 0,
],
'370d08585360f5c568b18d1f2e4ca1df' => [
'rowId' => '370d08585360f5c568b18d1f2e4ca1df',
@@ -545,8 +547,9 @@ class CartTest extends TestCase
'name' => 'Item name',
'qty' => 1,
'price' => '10.00',
'tax' => '2.10',
'subtotal' => '10.00',
'tax' => '2.10',
'total' => '7.90',
'options' => [],
'discount' => '0.00',
'weight' => 0,