Code Duplication    Length = 10-11 lines in 5 locations

tests/TemplatingControllerTest.php 3 locations

@@ 28-38 (lines=11) @@
25
 */
26
final class TemplatingControllerTest extends TestCase
27
{
28
    public function testCanBeCreated()
29
    {
30
        $this->assertInstanceOf(
31
            // TemplatingController::class, // 5.4 < php
32
            'SymfonyUtil\Controller\TemplatingController',
33
            new TemplatingController(new TwigEngine(
34
                new Twig_Environment(new Twig_Loader_Array(['index.html.twig' => 'Hello World!'])),
35
                new TemplateNameParser()
36
            ))
37
        );
38
    }
39
40
    public function testHomeCanBeCreated()
41
    {
@@ 40-49 (lines=10) @@
37
        );
38
    }
39
40
    public function testHomeCanBeCreated()
41
    {
42
        $this->assertInstanceOf(
43
            TemplatingController::class, // 5.4 < php
44
            new HomeTemplatingController(new TwigEngine(
45
                new Twig_Environment(new Twig_Loader_Array(['home.html.twig' => 'Hello World!'])),
46
                new TemplateNameParser()
47
            ))
48
        );
49
    }
50
51
    public function testEmptyReturnsResponse()
52
    {
@@ 51-60 (lines=10) @@
48
        );
49
    }
50
51
    public function testEmptyReturnsResponse()
52
    {
53
        $this->assertInstanceOf(
54
            Response::class, // 5.4 < php
55
            (new TemplatingController(new TwigEngine(
56
                new Twig_Environment(new Twig_Loader_Array(['index.html.twig' => 'Hello World!'])),
57
                new TemplateNameParser()
58
            )))->__invoke()
59
        );
60
    }
61
62
    public function testArrayReturnsResponse()
63
    {

tests/VariadicControllerTest.php 2 locations

@@ 24-34 (lines=11) @@
21
 */
22
final class VariadicControllerTest extends TestCase
23
{
24
    public function testCanBeCreated()
25
    {
26
        $this->assertInstanceOf(
27
            // VariadicController::class, // 5.4 < php (code is checked even if not executed!)
28
            'SymfonyUtil\Controller\VariadicController',
29
            new VariadicController(new TwigEngine(
30
                new Twig_Environment(new Twig_Loader_Array(['index.html.twig' => 'Hello World!'])),
31
                new TemplateNameParser()
32
            ))
33
        );
34
    }
35
36
    public function testEmptyReturnsResponse()
37
    {
@@ 36-46 (lines=11) @@
33
        );
34
    }
35
36
    public function testEmptyReturnsResponse()
37
    {
38
        $this->assertInstanceOf(
39
            // Response::class, // 5.4 < php (code is checked even if not executed!)
40
            'Symfony\Component\HttpFoundation\Response',
41
            (new VariadicController(new TwigEngine(
42
                new Twig_Environment(new Twig_Loader_Array(['index.html.twig' => 'Hello World!'])),
43
                new TemplateNameParser()
44
            )))->__invoke()
45
        );
46
    }
47
48
    public function testArrayReturnsResponse()
49
    {