@@ -425,9 +425,13 @@ public function testCancelOpenInvoice()
425
425
$ this ->order ->expects ($ this ->once ())->method ('getPayment ' )->willReturn ($ this ->paymentMock );
426
426
$ this ->order ->expects ($ this ->once ())->method ('getConfig ' )->willReturn ($ orderConfigMock );
427
427
428
- $ this ->paymentMock ->expects ($ this ->once ())->method ('cancelInvoice ' )->willReturn ($ this ->paymentMock );
428
+ $ this ->paymentMock ->expects ($ this ->once ())
429
+ ->method ('cancelInvoice ' )
430
+ ->willReturn ($ this ->paymentMock );
429
431
430
- $ this ->eventManagerMock ->expects ($ this ->once ())->method ('dispatch ' )->with ('sales_order_invoice_cancel ' );
432
+ $ this ->eventManagerMock ->expects ($ this ->once ())
433
+ ->method ('dispatch ' )
434
+ ->with ('sales_order_invoice_cancel ' );
431
435
432
436
$ this ->model ->setData (InvoiceInterface::ITEMS , []);
433
437
$ this ->model ->setState (Invoice::STATE_OPEN );
@@ -440,19 +444,21 @@ public function testCancelOpenInvoice()
440
444
* Assert open invoice can be canceled, and its status changes
441
445
*
442
446
* @param $initialInvoiceStatus
443
- * @param $expectedInvoiceStatus
447
+ * @param $finalInvoiceStatus
444
448
* @dataProvider getNotOpenedInvoiceStatuses
445
449
*/
446
- public function testCannotCancelNotOpenedInvoice ($ initialInvoiceStatus , $ expectedInvoiceStatus )
450
+ public function testCannotCancelNotOpenedInvoice ($ initialInvoiceStatus , $ finalInvoiceStatus )
447
451
{
448
452
$ this ->order ->expects ($ this ->never ())->method ('getPayment ' );
449
453
$ this ->paymentMock ->expects ($ this ->never ())->method ('cancelInvoice ' );
450
- $ this ->eventManagerMock ->expects ($ this ->never ())->method ('dispatch ' )->with ('sales_order_invoice_cancel ' );
454
+ $ this ->eventManagerMock ->expects ($ this ->never ())
455
+ ->method ('dispatch ' )
456
+ ->with ('sales_order_invoice_cancel ' );
451
457
452
458
$ this ->model ->setState ($ initialInvoiceStatus );
453
459
$ this ->model ->cancel ();
454
460
455
- self ::assertEquals ($ expectedInvoiceStatus , $ this ->model ->getState ());
461
+ self ::assertEquals ($ finalInvoiceStatus , $ this ->model ->getState ());
456
462
}
457
463
458
464
/**
0 commit comments