Skip to content

Commit 8965b5e

Browse files
committed
Fix Code Style and Codacy Variable too long
1 parent c4e1b29 commit 8965b5e

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

app/code/Magento/Sales/Test/Unit/Model/Order/InvoiceTest.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,13 @@ public function testCancelOpenInvoice()
425425
$this->order->expects($this->once())->method('getPayment')->willReturn($this->paymentMock);
426426
$this->order->expects($this->once())->method('getConfig')->willReturn($orderConfigMock);
427427

428-
$this->paymentMock->expects($this->once())->method('cancelInvoice')->willReturn($this->paymentMock);
428+
$this->paymentMock->expects($this->once())
429+
->method('cancelInvoice')
430+
->willReturn($this->paymentMock);
429431

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');
431435

432436
$this->model->setData(InvoiceInterface::ITEMS, []);
433437
$this->model->setState(Invoice::STATE_OPEN);
@@ -440,19 +444,21 @@ public function testCancelOpenInvoice()
440444
* Assert open invoice can be canceled, and its status changes
441445
*
442446
* @param $initialInvoiceStatus
443-
* @param $expectedInvoiceStatus
447+
* @param $finalInvoiceStatus
444448
* @dataProvider getNotOpenedInvoiceStatuses
445449
*/
446-
public function testCannotCancelNotOpenedInvoice($initialInvoiceStatus, $expectedInvoiceStatus)
450+
public function testCannotCancelNotOpenedInvoice($initialInvoiceStatus, $finalInvoiceStatus)
447451
{
448452
$this->order->expects($this->never())->method('getPayment');
449453
$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');
451457

452458
$this->model->setState($initialInvoiceStatus);
453459
$this->model->cancel();
454460

455-
self::assertEquals($expectedInvoiceStatus, $this->model->getState());
461+
self::assertEquals($finalInvoiceStatus, $this->model->getState());
456462
}
457463

458464
/**

0 commit comments

Comments
 (0)