Skip to content

Commit 4cb65b6

Browse files
committed
LYNX-199: Adjusted QuoteManagementTest unit test
1 parent b37c38a commit 4cb65b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/code/Magento/Quote/Test/Unit/Model/QuoteManagementTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ public function testSubmit(): void
837837
['order' => $order, 'quote' => $quote]
838838
]
839839
);
840-
$this->lockManagerMock->method('isLocked')->willReturn(false);
840+
$this->lockManagerMock->method('lock')->willReturn(true);
841841
$this->quoteRepositoryMock->expects($this->once())->method('save')->with($quote);
842842
$this->assertEquals($order, $this->model->submit($quote, $orderData));
843843
}
@@ -1378,6 +1378,7 @@ public function testSubmitForCustomer(): void
13781378
['order' => $order, 'quote' => $quote]
13791379
]
13801380
);
1381+
$this->lockManagerMock->method('lock')->willReturn(true);
13811382
$this->quoteRepositoryMock->expects($this->once())->method('save')->with($quote);
13821383
$this->assertEquals($order, $this->model->submit($quote, $orderData));
13831384
}
@@ -1501,7 +1502,7 @@ public function testSubmitWithLockException(): void
15011502
['order' => $order, 'quote' => $quote]
15021503
]
15031504
);
1504-
$this->lockManagerMock->method('isLocked')->willReturn(true);
1505+
$this->lockManagerMock->method('lock')->willReturn(false);
15051506

15061507
$this->expectExceptionMessage(
15071508
'A server error stopped your order from being placed. Please try to place your order again.'

0 commit comments

Comments
 (0)