Test/Unit/Block/Onepage/ReviewTest.php 1 location
|
@@ 192-200 (lines=9) @@
|
| 189 |
|
$this->assertEquals('', $result); |
| 190 |
|
} |
| 191 |
|
|
| 192 |
|
public function testRenderShippingRateValueNoError() |
| 193 |
|
{ |
| 194 |
|
$expected = 'code'; |
| 195 |
|
$object = $this->getMockBuilder(DataObject::class)->disableOriginalConstructor()->setMethods(['getErrorMessage', 'getCode'])->getMock(); |
| 196 |
|
$object->method('getErrorMessage')->willReturn(false); |
| 197 |
|
$object->method('getCode')->willReturn($expected); |
| 198 |
|
$result = $this->classToTest->renderShippingRateValue($object); |
| 199 |
|
$this->assertEquals($expected, $result); |
| 200 |
|
} |
| 201 |
|
|
| 202 |
|
public function testRenderShippingRateOption() |
| 203 |
|
{ |
Test/Unit/Helper/ToolkitTest.php 1 location
|
@@ 214-225 (lines=12) @@
|
| 211 |
|
$this->assertTrue($result); |
| 212 |
|
} |
| 213 |
|
|
| 214 |
|
public function testGetAdditionalDataEntryOld() |
| 215 |
|
{ |
| 216 |
|
$expected = 'value'; |
| 217 |
|
|
| 218 |
|
$dataObject = $this->getMockBuilder(DataObject::class)->disableOriginalConstructor()->getMock(); |
| 219 |
|
$dataObject->method('getData')->willReturn($expected); |
| 220 |
|
|
| 221 |
|
$this->shopHelper->method('getMagentoVersion')->willReturn('2.0.0'); |
| 222 |
|
|
| 223 |
|
$result = $this->toolkit->getAdditionalDataEntry($dataObject, 'key'); |
| 224 |
|
$this->assertEquals($expected, $result); |
| 225 |
|
} |
| 226 |
|
|
| 227 |
|
public function testGetAdditionalDataEntryNew() |
| 228 |
|
{ |
Test/Unit/Model/Risk/AddresscheckTest.php 1 location
|
@@ 295-305 (lines=11) @@
|
| 292 |
|
$this->assertEquals($expected, $result); |
| 293 |
|
} |
| 294 |
|
|
| 295 |
|
public function testGetScoreStillValid() |
| 296 |
|
{ |
| 297 |
|
$this->addresscheck->method('sendRequest')->willReturn(true); |
| 298 |
|
$address = $this->getMockBuilder(Address::class)->disableOriginalConstructor()->getMock(); |
| 299 |
|
|
| 300 |
|
$expected = 'X'; |
| 301 |
|
$this->databaseHelper->method('getOldAddressStatus')->willReturn($expected); |
| 302 |
|
|
| 303 |
|
$result = $this->classToTest->getScore($address); |
| 304 |
|
$this->assertEquals($expected, $result); |
| 305 |
|
} |
| 306 |
|
|
| 307 |
|
public function testGetResponse() |
| 308 |
|
{ |
Test/Unit/Observer/CheckoutSubmitBeforeTest.php 1 location
|
@@ 203-214 (lines=12) @@
|
| 200 |
|
$this->assertTrue($result); |
| 201 |
|
} |
| 202 |
|
|
| 203 |
|
public function testGetScoreByCreditrating() |
| 204 |
|
{ |
| 205 |
|
$expected = 'G'; |
| 206 |
|
|
| 207 |
|
$this->consumerscore->method('sendRequest')->willReturn(true); |
| 208 |
|
|
| 209 |
|
$address = $this->getMockBuilder(Address::class)->disableOriginalConstructor()->setMethods(['getPayoneProtectScore'])->getMock(); |
| 210 |
|
$address->method('getPayoneProtectScore')->willReturn($expected); |
| 211 |
|
|
| 212 |
|
$result = $this->classToTest->getScoreByCreditrating($address); |
| 213 |
|
$this->assertEquals($expected, $result); |
| 214 |
|
} |
| 215 |
|
|
| 216 |
|
public function testGetScoreByCreditratingScoreIsset() |
| 217 |
|
{ |
Test/Unit/Observer/Transactionstatus/AppointedTest.php 1 location
|
@@ 65-74 (lines=10) @@
|
| 62 |
|
]); |
| 63 |
|
} |
| 64 |
|
|
| 65 |
|
public function testExecute() |
| 66 |
|
{ |
| 67 |
|
$order = $this->getMockBuilder(Order::class)->disableOriginalConstructor()->getMock(); |
| 68 |
|
|
| 69 |
|
$observer = $this->getMockBuilder(Observer::class)->disableOriginalConstructor()->setMethods(['getOrder'])->getMock(); |
| 70 |
|
$observer->method('getOrder')->willReturn($order); |
| 71 |
|
|
| 72 |
|
$result = $this->classToTest->execute($observer); |
| 73 |
|
$this->assertNull($result); |
| 74 |
|
} |
| 75 |
|
|
| 76 |
|
public function testExecuteException() |
| 77 |
|
{ |