File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -311,15 +311,19 @@ public function test_build_invoice_payments_data_uses_order_creation_date() {
311311 $ result = $ method ->invokeArgs ( null , [ $ order , $ mapping ] );
312312
313313 $ this ->assertIsArray ( $ result );
314+ $ this ->assertNotEmpty ( $ result );
315+
316+ $ payment = $ result [0 ];
317+
314318 $ this ->assertSame (
315- wc_format_datetime ( $ order ->get_date_created (), 'y -m-d ' ),
316- $ result ['date ' ],
319+ wc_format_datetime ( $ order ->get_date_created (), 'Y -m-d ' ),
320+ $ payment ['date ' ],
317321 'La fecha del pago debe usar la fecha de creación del pedido '
318322 );
319- $ this ->assertSame ( 3 , $ result ['account ' ]['id ' ] );
320- $ this ->assertSame ( 'transfer ' , $ result ['paymentMethod ' ] );
321- $ this ->assertSame ( 100000 , $ result ['amount ' ] );
322- $ this ->assertSame ( 'COP ' , $ result ['currency ' ]['code ' ] );
323+ $ this ->assertSame ( ' 3 ' , $ payment ['account ' ]['id ' ] );
324+ $ this ->assertSame ( 'transfer ' , $ payment ['paymentMethod ' ] );
325+ $ this ->assertSame ( 100000.0 , $ payment ['amount ' ] );
326+ $ this ->assertSame ( 'COP ' , $ payment ['currency ' ]['code ' ] );
323327 }
324328
325329 /**
You can’t perform that action at this time.
0 commit comments