Code Duplication    Length = 15-18 lines in 2 locations

tests/FwlibTest/Html/Generator/Helper/GetJsLoadHtmlTraitTest.php 1 location

@@ 28-45 (lines=18) @@
25
    }
26
27
28
    public function testGetJsLoadHtml()
29
    {
30
        $trait = $this->buildMock(['getJsPath']);
31
        $trait->expects($this->once())
32
            ->method('getJsPath')
33
            ->willReturn('path/to/file');
34
35
        $expectedOutput = <<<TAG
36
<script type='text/javascript' src='path/to/file'></script>\n
37
TAG;
38
        $this->assertEquals(
39
            $expectedOutput,
40
            $this->reflectionCall($trait, 'getJsLoadHtml')
41
        );
42
43
        // Second call will not duplicate load
44
        $this->assertEmpty($this->reflectionCall($trait, 'getJsLoadHtml'));
45
    }
46
}
47

tests/FwlibTest/Test/Benchmark/BenchmarkTest.php 1 location

@@ 32-46 (lines=15) @@
29
    }
30
31
32
    public function testAutoStop()
33
    {
34
        $benchmark = $this->buildMock(['getCurrentGroup', 'stop']);
35
36
        $group = (new Group(0))->setBeginTime(42);
37
        $benchmark->expects($this->once())
38
            ->method('getCurrentGroup')
39
            ->willReturn($group);
40
41
        $benchmark->expects($this->once())
42
            ->method('stop');
43
44
45
        $this->reflectionCall($benchmark, 'autoStop');
46
    }
47
48
49
    public function testDisplay()