@@ 127-134 (lines=8) @@ | ||
124 | $this->assertTrue($result); |
|
125 | } |
|
126 | ||
127 | public function testCorrectAddress() |
|
128 | { |
|
129 | $address = $this->getMockBuilder(Address::class)->disableOriginalConstructor()->getMock(); |
|
130 | $this->addresscheck->method('sendRequest')->willReturn(true); |
|
131 | ||
132 | $result = $this->classToTest->correctAddress($address); |
|
133 | $this->assertEquals($address, $result); |
|
134 | } |
|
135 | ||
136 | public function testHandleAddressManagement() |
|
137 | { |
|
@@ 295-303 (lines=9) @@ | ||
292 | $this->assertEquals($expected, $result); |
|
293 | } |
|
294 | ||
295 | public function testGetResponse() |
|
296 | { |
|
297 | $this->addresscheck->method('sendRequest')->willReturn(true); |
|
298 | ||
299 | $address = $this->getMockBuilder(Address::class)->disableOriginalConstructor()->getMock(); |
|
300 | ||
301 | $result = $this->classToTest->getResponse($address); |
|
302 | $this->assertTrue($result); |
|
303 | } |
|
304 | } |
|
305 |
@@ 74-82 (lines=9) @@ | ||
71 | ]); |
|
72 | } |
|
73 | ||
74 | public function testSendRequestTrueNotEnabled() |
|
75 | { |
|
76 | $address = $this->getMockBuilder(Address::class)->disableOriginalConstructor()->getMock(); |
|
77 | ||
78 | $this->shopHelper->method('getConfigParam')->willReturn(false); |
|
79 | ||
80 | $result = $this->classToTest->sendRequest($address, true); |
|
81 | $this->assertTrue($result); |
|
82 | } |
|
83 | ||
84 | public function testSendRequestTrueNoBilling() |
|
85 | { |
@@ 186-194 (lines=9) @@ | ||
183 | $this->assertTrue($result); |
|
184 | } |
|
185 | ||
186 | public function testSendRequestNotNeeded() |
|
187 | { |
|
188 | $address = $this->getMockBuilder(Address::class)->disableOriginalConstructor()->getMock(); |
|
189 | ||
190 | $this->shopHelper->method('getConfigParam')->willReturn(false); |
|
191 | ||
192 | $result = $this->classToTest->sendRequest($address); |
|
193 | $this->assertTrue($result); |
|
194 | } |
|
195 | } |
|
196 |