Code Duplication    Length = 7-8 lines in 5 locations

Test/Unit/Observer/AddPaypalExpressButtonTest.php 1 location

@@ 68-75 (lines=8) @@
65
        ]);
66
    }
67
68
    public function testExecutePaypalInactive()
69
    {
70
        $this->paymentHelper->method('isPayPalExpressActive')->willReturn(false);
71
        $observer = $this->getMockBuilder(Observer::class)->disableOriginalConstructor()->getMock();
72
73
        $result = $this->classToTest->execute($observer);
74
        $this->assertNull($result);
75
    }
76
77
    public function testExecutePaypalActive()
78
    {

Test/Unit/Observer/PredispatchCheckoutIndexTest.php 1 location

@@ 96-102 (lines=7) @@
93
        ]);
94
    }
95
96
    public function testExecute()
97
    {
98
        $observer = $this->getMockBuilder(Observer::class)->disableOriginalConstructor()->getMock();
99
100
        $result = $this->classToTest->execute($observer);
101
        $this->assertNull($result);
102
    }
103
104
    public function testExecuteLocalizedException()
105
    {

Test/Unit/Observer/Transactionstatus/AppointedTest.php 1 location

@@ 90-97 (lines=8) @@
87
        $this->assertNull($result);
88
    }
89
90
    public function testExecuteNoOrder()
91
    {
92
        $observer = $this->getMockBuilder(Observer::class)->disableOriginalConstructor()->setMethods(['getOrder'])->getMock();
93
        $observer->method('getOrder')->willReturn(null);
94
95
        $result = $this->classToTest->execute($observer);
96
        $this->assertNull($result);
97
    }
98
}
99

Test/Unit/Observer/Transactionstatus/PaidTest.php 1 location

@@ 91-98 (lines=8) @@
88
        $this->assertNull($result);
89
    }
90
91
    public function testExecuteNoOrder()
92
    {
93
        $observer = $this->getMockBuilder(Observer::class)->disableOriginalConstructor()->setMethods(['getOrder'])->getMock();
94
        $observer->method('getOrder')->willReturn(null);
95
96
        $result = $this->classToTest->execute($observer);
97
        $this->assertNull($result);
98
    }
99
}
100

Test/Unit/Observer/CheckoutSubmitBeforeTest.php 1 location

@@ 297-304 (lines=8) @@
294
        $this->assertNull($result);
295
    }
296
297
    public function testExecuteNoQuote()
298
    {
299
        $observer = $this->getMockBuilder(Observer::class)->disableOriginalConstructor()->setMethods(['getQuote'])->getMock();
300
        $observer->method('getQuote')->willReturn(null);
301
302
        $result = $this->classToTest->execute($observer);
303
        $this->assertNull($result);
304
    }
305
306
    public function testExecuteException()
307
    {