Update CartItemTest.php

This commit is contained in:
Patrick
2022-02-05 21:56:03 +01:00
committed by GitHub
parent 68d4185791
commit 7ae044841c

View File

@@ -38,9 +38,9 @@ class CartItemTest extends TestCase
'size' => 'XL',
'color' => 'red',
],
'tax' => 0,
'subtotal' => 20.00,
'discount' => 0.0,
'tax' => '0.00',
'subtotal' => '20.00',
'discount' => '0.00',
'weight' => 550,
], $cartItem->toArray());
}
@@ -52,7 +52,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,"tax":0,"subtotal":20}';
$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"}';
$this->assertEquals($json, $cartItem->toJson());
}