Code Duplication    Length = 12-12 lines in 2 locations

Tests/EventListener/ExceptionListenerTest.php 2 locations

@@ 70-81 (lines=12) @@
67
        $this->assertSame('response', $event->getResponse()->getContent());
68
    }
69
70
    public function testPaymentExceptionWithReferrer()
71
    {
72
        $payment = $this->getMockForAbstractClass(Payment::class);
73
        $payment->setReferrer('referrer');
74
75
        $exception = PaymentException::create('exception', $this->request, $payment);
76
77
        $event = $this->getGetResponseForExceptionEvent($this->request, $exception);
78
        $this->listener->onKernelException($event);
79
80
        $this->assertSame('responsereferrer', $event->getResponse()->getContent());
81
    }
82
83
    public function testPaymentExceptionWithCallbackServerUrl()
84
    {
@@ 83-94 (lines=12) @@
80
        $this->assertSame('responsereferrer', $event->getResponse()->getContent());
81
    }
82
83
    public function testPaymentExceptionWithCallbackServerUrl()
84
    {
85
        $payment = $this->getMockForAbstractClass(Payment::class);
86
        $payment->setCallBackServerUrl('example.com');
87
88
        $exception = PaymentException::create('exception', $this->request, $payment);
89
90
        $event = $this->getGetResponseForExceptionEvent($this->request, $exception);
91
        $this->listener->onKernelException($event);
92
93
        $this->assertSame('responsehttp://example.com', $event->getResponse()->getContent());
94
    }
95
96
    protected function getGetResponseForExceptionEvent(Request $request, \Exception $e)
97
    {