Code Duplication    Length = 18-18 lines in 2 locations

tests/FwlibTest/Html/Generator/Element/AbstractJsAlertTest.php 1 location

@@ 19-36 (lines=18) @@
16
     * @param   string[] $methods
17
     * @return  MockObject|AbstractJsAlert
18
     */
19
    protected function buildMock(array $methods = null)
20
    {
21
        if (is_null($methods)) {
22
            $methods = [];
23
        }
24
        $methods = array_merge($methods, ['getJsPath']);
25
26
        $mock = $this->getMock(
27
            AbstractJsAlert::class,
28
            $methods
29
        );
30
31
        $mock->expects($this->any())
32
            ->method('getJsPath')
33
            ->willReturn('/path/to/js');
34
35
        return $mock;
36
    }
37
38
39
    public function testGetOutputForShowMode()

tests/FwlibTest/Html/Generator/Element/AbstractWDatePickerTest.php 1 location

@@ 19-36 (lines=18) @@
16
     * @param   string[] $methods
17
     * @return  MockObject|AbstractWDatePicker
18
     */
19
    protected function buildMock(array $methods = null)
20
    {
21
        if (is_null($methods)) {
22
            $methods = [];
23
        }
24
        $methods = array_merge($methods, ['getJsPath']);
25
26
        $mock = $this->getMock(
27
            AbstractWDatePicker::class,
28
            $methods
29
        );
30
31
        $mock->expects($this->any())
32
            ->method('getJsPath')
33
            ->willReturn('path/to/file');
34
35
        return $mock;
36
    }
37
38
39
    public function testGetOutputForEditMode()