@@ 76-84 (lines=9) @@ | ||
73 | ]); |
|
74 | } |
|
75 | ||
76 | public function testSendRequestTrueNotEnabled() |
|
77 | { |
|
78 | $address = $this->getMockBuilder(Address::class)->disableOriginalConstructor()->getMock(); |
|
79 | ||
80 | $this->shopHelper->method('getConfigParam')->willReturn(false); |
|
81 | ||
82 | $result = $this->classToTest->sendRequest($address, true); |
|
83 | $this->assertTrue($result); |
|
84 | } |
|
85 | ||
86 | public function testSendRequestTrueNoBilling() |
|
87 | { |
@@ 188-196 (lines=9) @@ | ||
185 | $this->assertTrue($result); |
|
186 | } |
|
187 | ||
188 | public function testSendRequestNotNeeded() |
|
189 | { |
|
190 | $address = $this->getMockBuilder(Address::class)->disableOriginalConstructor()->getMock(); |
|
191 | ||
192 | $this->shopHelper->method('getConfigParam')->willReturn(false); |
|
193 | ||
194 | $result = $this->classToTest->sendRequest($address); |
|
195 | $this->assertTrue($result); |
|
196 | } |
|
197 | } |
|
198 |
@@ 149-156 (lines=8) @@ | ||
146 | $this->assertTrue($result); |
|
147 | } |
|
148 | ||
149 | public function testCorrectAddress() |
|
150 | { |
|
151 | $address = $this->getMockBuilder(Address::class)->disableOriginalConstructor()->getMock(); |
|
152 | $this->addresscheck->method('sendRequest')->willReturn(true); |
|
153 | ||
154 | $result = $this->classToTest->correctAddress($address); |
|
155 | $this->assertEquals($address, $result); |
|
156 | } |
|
157 | ||
158 | public function testHandleAddressManagement() |
|
159 | { |
|
@@ 307-315 (lines=9) @@ | ||
304 | $this->assertEquals($expected, $result); |
|
305 | } |
|
306 | ||
307 | public function testGetResponse() |
|
308 | { |
|
309 | $this->addresscheck->method('sendRequest')->willReturn(true); |
|
310 | ||
311 | $address = $this->getMockBuilder(Address::class)->disableOriginalConstructor()->getMock(); |
|
312 | ||
313 | $result = $this->classToTest->getResponse($address); |
|
314 | $this->assertTrue($result); |
|
315 | } |
|
316 | } |
|
317 |