Code Duplication    Length = 7-9 lines in 3 locations

Test/Unit/Block/Onepage/ReviewTest.php 2 locations

@@ 159-166 (lines=8) @@
156
        $this->assertFalse($result);
157
    }
158
159
    public function testRenderAddress()
160
    {
161
        $address = $this->getMockBuilder(Address::class)->disableOriginalConstructor()->getMock();
162
        $address->method('getData')->willReturn(['key' => 'value']);
163
        $result = $this->classToTest->renderAddress($address);
164
        $expected = 'address'; // see setUp method
165
        $this->assertEquals($expected, $result);
166
    }
167
168
    public function testGetCarrierName()
169
    {
@@ 184-190 (lines=7) @@
181
        $this->assertEquals($expected, $result);
182
    }
183
184
    public function testRenderShippingRateValue()
185
    {
186
        $object = $this->getMockBuilder(DataObject::class)->disableOriginalConstructor()->setMethods(['getErrorMessage'])->getMock();
187
        $object->method('getErrorMessage')->willReturn('error');
188
        $result = $this->classToTest->renderShippingRateValue($object);
189
        $this->assertEquals('', $result);
190
    }
191
192
    public function testRenderShippingRateValueNoError()
193
    {

Test/Unit/Model/Risk/AddresscheckTest.php 1 location

@@ 253-261 (lines=9) @@
250
        $this->classToTest->handleAddressManagement($address, $this->quote, false);
251
    }
252
253
    public function testGetScoreR()
254
    {
255
        $this->addresscheck->method('sendRequest')->willReturn(['status' => 'INVALID']);
256
        $address = $this->getMockBuilder(Address::class)->disableOriginalConstructor()->getMock();
257
258
        $result = $this->classToTest->getScore($address);
259
        $expected = 'R';
260
        $this->assertEquals($expected, $result);
261
    }
262
263
    public function testGetScorePersonstatusNoMapping()
264
    {