Code Duplication    Length = 8-8 lines in 5 locations

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

@@ 98-105 (lines=8) @@
95
        $this->assertFalse($result);
96
    }
97
98
    public function testGetMandateId()
99
    {
100
        $expected = '12345';
101
        $this->checkoutSession->method('getPayoneMandate')->willReturn(['mandate_identification' => $expected]);
102
103
        $result = $this->classToTest->getMandateId();
104
        $this->assertEquals($expected, $result);
105
    }
106
107
    public function testGetMandateIdFalse()
108
    {
@@ 124-131 (lines=8) @@
121
        $this->assertEquals($expected, $result);
122
    }
123
124
    public function testGetErrorMessage()
125
    {
126
        $expected = 'An error occured';
127
        $this->checkoutSession->method('getPayoneDebitError')->willReturn($expected);
128
129
        $result = $this->classToTest->getErrorMessage();
130
        $this->assertEquals($expected, $result);
131
    }
132
}
133

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

@@ 129-136 (lines=8) @@
126
        $this->assertEquals($expected, $result);
127
    }
128
129
    public function testGetInstructionNotes()
130
    {
131
        $expected = 'Instruction text';
132
        $this->checkoutSession->method('getPayoneInstructionNotes')->willReturn($expected);
133
134
        $result = $this->classToTest->getInstructionNotes();
135
        $this->assertEquals($expected, $result);
136
    }
137
138
    public function testToHtml()
139
    {
@@ 138-145 (lines=8) @@
135
        $this->assertEquals($expected, $result);
136
    }
137
138
    public function testToHtml()
139
    {
140
        $this->checkoutSession->method('getPayoneInstructionNotes')->willReturn('Dummy text');
141
142
        $result = $this->classToTest->toHtml();
143
        $expected = '';
144
        $this->assertEquals($expected, $result);
145
    }
146
147
    public function testToHtmlEmpty()
148
    {

Test/Unit/Block/Onepage/Review/DetailsTest.php 1 location

@@ 61-68 (lines=8) @@
58
        $this->classToTest->setCustomQuote($this->quote);
59
    }
60
61
    public function testGetTotals()
62
    {
63
        $expected = ['subtotal' => 123.00];
64
        $this->quote->method('getTotals')->willReturn($expected);
65
66
        $result = $this->classToTest->getTotals();
67
        $this->assertEquals($expected, $result);
68
    }
69
70
    public function testGetAddress()
71
    {