Skip to content

Commit 66613c8

Browse files
author
rahul
committed
test case updated
1 parent a9d6416 commit 66613c8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/code/Magento/CheckoutAgreements/Test/Unit/Model/AgreementsConfigProviderTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public function testGetConfigIfContentIsHtml()
7777
$escapedCheckboxText = 'escaped_checkbox_text';
7878
$mode = \Magento\CheckoutAgreements\Model\AgreementModeOptions::MODE_AUTO;
7979
$agreementId = 100;
80+
$contentHeight = '100px';
8081
$expectedResult = [
8182
'checkoutAgreements' => [
8283
'isEnabled' => 1,
@@ -86,6 +87,7 @@ public function testGetConfigIfContentIsHtml()
8687
'checkboxText' => $escapedCheckboxText,
8788
'mode' => $mode,
8889
'agreementId' => $agreementId,
90+
'contentHeight' => $contentHeight
8991
],
9092
],
9193
],
@@ -116,6 +118,7 @@ public function testGetConfigIfContentIsHtml()
116118
$agreement->expects($this->once())->method('getCheckboxText')->willReturn($checkboxText);
117119
$agreement->expects($this->once())->method('getMode')->willReturn($mode);
118120
$agreement->expects($this->once())->method('getAgreementId')->willReturn($agreementId);
121+
$agreement->expects($this->once())->method('getContentHeight')->willReturn($contentHeight);
119122

120123
$this->assertEquals($expectedResult, $this->model->getConfig());
121124
}
@@ -133,6 +136,7 @@ public function testGetConfigIfContentIsNotHtml()
133136
$escapedCheckboxText = 'escaped_checkbox_text';
134137
$mode = \Magento\CheckoutAgreements\Model\AgreementModeOptions::MODE_AUTO;
135138
$agreementId = 100;
139+
$contentHeight = '100px';
136140
$expectedResult = [
137141
'checkoutAgreements' => [
138142
'isEnabled' => 1,
@@ -142,6 +146,7 @@ public function testGetConfigIfContentIsNotHtml()
142146
'checkboxText' => $escapedCheckboxText,
143147
'mode' => $mode,
144148
'agreementId' => $agreementId,
149+
'contentHeight' => $contentHeight
145150
],
146151
],
147152
],
@@ -172,6 +177,7 @@ public function testGetConfigIfContentIsNotHtml()
172177
$agreement->expects($this->once())->method('getCheckboxText')->willReturn($checkboxText);
173178
$agreement->expects($this->once())->method('getMode')->willReturn($mode);
174179
$agreement->expects($this->once())->method('getAgreementId')->willReturn($agreementId);
180+
$agreement->expects($this->once())->method('getContentHeight')->willReturn($contentHeight);
175181

176182
$this->assertEquals($expectedResult, $this->model->getConfig());
177183
}

0 commit comments

Comments
 (0)