Skip to content

Commit 3f0793f

Browse files
committed
Fixed failing test
1 parent 1e24c3a commit 3f0793f

File tree

1 file changed

+6
-1
lines changed
  • app/code/Magento/GoogleGtag/Test/Unit/Block

1 file changed

+6
-1
lines changed

app/code/Magento/GoogleGtag/Test/Unit/Block/GaTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ protected function setUp(): void
117117
return $value;
118118
});
119119

120+
$escaper->expects($this->any())
121+
->method('escapeHtml')
122+
->withConsecutive([__('sku0')], [__('testName0')], [__('test')])
123+
->willReturnOnConsecutiveCalls('sku0', 'testName0', 'test');
124+
120125
$this->gaBlock = $objectManager->getObject(
121126
Ga::class,
122127
[
@@ -231,7 +236,7 @@ protected function createOrderMock($orderItemCount = 1)
231236
$orderMock->expects($this->once())->method('getGrandTotal')->willReturn(10);
232237
$orderMock->expects($this->once())->method('getTaxAmount')->willReturn(2);
233238
$orderMock->expects($this->once())->method('getShippingAmount')->willReturn($orderItemCount);
234-
$orderMock->expects($this->exactly(2))->method('getOrderCurrencyCode')->willReturn('USD');
239+
$orderMock->expects($this->once())->method('getOrderCurrencyCode')->willReturn('USD');
235240
return $orderMock;
236241
}
237242

0 commit comments

Comments
 (0)