@@ -51,15 +51,7 @@ public function testValidOrder(): void
5151 'cancel_url ' => 'http://example.com/order_canceled ' ,
5252 'callback_url ' => 'http://example.com/webhook_url ' ,
5353 ],
54- 'line_items ' => [
55- [
56- 'sku ' => 'tshirt-1234 ' ,
57- 'name ' => 'T-shirt ' ,
58- 'price ' => '10.00 ' ,
59- 'currency ' => 'EUR ' ,
60- 'quantity ' => 1 ,
61- ],
62- ],
54+
6355 ];
6456
6557 $ result = Validator::order ($ validOrderData );
@@ -78,30 +70,10 @@ public function testInvalidOrder(): void
7870 'return_url ' => 'http://example.com/order_success ' ,
7971 'cancel_url ' => 'example.com/this-is-not-a-correct-url ' ,
8072 ],
81- 'line_items ' => [
82- [
83- 'sku ' => 'tshirt-1234 ' ,
84- 'quantity ' => 'this-is-not-an-integer ' ,
85- ],
86- ],
8773 ];
8874
8975 $ expected_errors_message = print_r ([
9076 "reference " => ["Reference is required " ],
91- "line_items.*.name " => [
92- "Line Items.*.name is required " ,
93- ],
94- "line_items.*.price " => [
95- "Line Items.*.price is required " ,
96- ],
97- "line_items.*.currency " => [
98- "Line Items.*.currency is required " ,
99- "Line Items.*.currency contains invalid characters " ,
100- ],
101- "line_items.*.quantity " => [
102-
103- "Line Items.*.quantity must be an integer " ,
104- ],
10577 "amount.currency " => [
10678 "Amount.currency contains invalid characters " ,
10779 ],
0 commit comments