Code Duplication    Length = 15-15 lines in 2 locations

src/Tests/EventListener/ExceptionListenerTest.php 2 locations

@@ 70-84 (lines=15) @@
67
    /**
68
     * @test
69
     */
70
    public function willLogExceptionsWith4xxCodesAsInputErrorNotices()
71
    {
72
        for ($i = 0; $i < 99; $i++) {
73
            $logger = $this->getMockForAbstractClass('Psr\Log\LoggerInterface');
74
            $logger
75
                ->expects($this->once())
76
                ->method('notice')
77
                ->with($this->stringStartsWith('Input error'));
78
79
            /** @var LoggerInterface $logger */
80
            $this->exceptionListener->setLogger($logger);
81
            $this->codeProperty->setValue($this->exception, 400 + $i);
82
            $this->exceptionListener->onKernelException($this->event);
83
        }
84
    }
85
86
    /**
87
     * @test
@@ 89-103 (lines=15) @@
86
    /**
87
     * @test
88
     */
89
    public function willLogExceptionsWith5xxCodesAsRuntimeErrors()
90
    {
91
        for ($i = 0; $i < 99; $i++) {
92
            $logger = $this->getMockForAbstractClass('Psr\Log\LoggerInterface');
93
            $logger
94
                ->expects($this->once())
95
                ->method('error')
96
                ->with($this->stringStartsWith('Runtime error'));
97
98
            /** @var LoggerInterface $logger */
99
            $this->exceptionListener->setLogger($logger);
100
            $this->codeProperty->setValue($this->exception, 500 + $i);
101
            $this->exceptionListener->onKernelException($this->event);
102
        }
103
    }
104
105
    /**
106
     * @test