Code Duplication    Length = 17-17 lines in 2 locations

tests/TemplatingControllerTest.php 1 location

@@ 64-80 (lines=17) @@
61
        );
62
    }
63
64
    public function testArrayReturnsResponse()
65
    {
66
        $this->assertInstanceOf(
67
            // Response::class, // 5.4 < php
68
            'Symfony\Component\HttpFoundation\Response',
69
            (new TemplatingController(new TwigEngine(
70
                new Twig_Environment(new Twig_Loader_Array([
71
                    'index.html.twig' => '<ul>{% for item in 0 %}<li>{{ item }}</li>{% endfor %}</ul>',
72
                ])),
73
                new TemplateNameParser()
74
            )))->__invoke([ // This is strange.
75
                'One',
76
                'Two',
77
                'Three',
78
            ])
79
        );
80
    }
81
}
82
83
// 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