| @@ 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 | { |
|
| @@ 274-282 (lines=9) @@ | ||
| 271 | $this->assertEquals($expected, $result); |
|
| 272 | } |
|
| 273 | ||
| 274 | public function testGetResponse() |
|
| 275 | { |
|
| 276 | $this->addresscheck->method('sendRequest')->willReturn(true); |
|
| 277 | ||
| 278 | $address = $this->getMockBuilder(Address::class)->disableOriginalConstructor()->getMock(); |
|
| 279 | ||
| 280 | $result = $this->classToTest->getResponse($address); |
|
| 281 | $this->assertTrue($result); |
|
| 282 | } |
|
| 283 | } |
|
| 284 | ||
| @@ 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 | ||