Code Duplication    Length = 8-8 lines in 5 locations

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

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

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

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

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

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