Code Duplication    Length = 16-17 lines in 2 locations

tests/TemplatingControllerTest.php 1 location

@@ 62-77 (lines=16) @@
59
        );
60
    }
61
62
    public function testArrayReturnsResponse()
63
    {
64
        $this->assertInstanceOf(
65
            Response::class, // 5.4 < php
66
            (new TemplatingController(new TwigEngine(
67
                new Twig_Environment(new Twig_Loader_Array([
68
                    'index.html.twig' => '<ul>{% for item in 0 %}<li>{{ item }}</li>{% endfor %}</ul>',
69
                ])),
70
                new TemplateNameParser()
71
            )))->__invoke([ // This is strange.
72
                'One',
73
                'Two',
74
                'Three',
75
            ])
76
        );
77
    }
78
}
79
80
// http://api.symfony.com/3.3/Symfony/Bridge/Twig/TwigEngine.html

tests/VariadicControllerTest.php 1 location

@@ 48-64 (lines=17) @@
45
        );
46
    }
47
48
    public function testArrayReturnsResponse()
49
    {
50
        $this->assertInstanceOf(
51
            // Response::class, // 5.4 < php (code is checked even if not executed!)
52
            'Symfony\Component\HttpFoundation\Response',
53
            (new VariadicController(new TwigEngine(
54
                new Twig_Environment(new Twig_Loader_Array([
55
                    'index.html.twig' => '<ul>{% for item in 0 %}<li>{{ item }}</li>{% endfor %}</ul>',
56
                ])),
57
                new TemplateNameParser()
58
            )))->__invoke([
59
                'One',
60
                'Two',
61
                'Three',
62
            ])
63
        );
64
    }
65
}
66
67
// http://api.symfony.com/3.3/Symfony/Bridge/Twig/TwigEngine.html