Code Duplication    Length = 11-11 lines in 5 locations

tests/EngineAsArgumentControllerTest.php 1 location

@@ 32-42 (lines=11) @@
29
        );
30
    }
31
32
    public function testReturnsResponse()
33
    {
34
        $this->assertInstanceOf(
35
            // Response::class, // 5.4 < php
36
            'Symfony\Component\HttpFoundation\Response',
37
            (new EngineAsArgumentController())->__invoke(new TwigEngine(
38
                new Twig_Environment(new Twig_Loader_Array(['index.html.twig' => 'Hello World!'])),
39
                new TemplateNameParser()
40
            ))
41
        );
42
    }
43
}
44
45
// http://api.symfony.com/3.3/Symfony/Bridge/Twig/TwigEngine.html

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
            // ::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-50 (lines=11) @@
37
        );
38
    }
39
40
    public function testHomeCanBeCreated()
41
    {
42
        $this->assertInstanceOf(
43
            // ::class, // 5.4 < php
44
            'SymfonyUtil\Controller\TemplatingController',
45
            new HomeTemplatingController(new TwigEngine(
46
                new Twig_Environment(new Twig_Loader_Array(['home.html.twig' => 'Hello World!'])),
47
                new TemplateNameParser()
48
            ))
49
        );
50
    }
51
52
    public function testEmptyReturnsResponse()
53
    {
@@ 52-62 (lines=11) @@
49
        );
50
    }
51
52
    public function testEmptyReturnsResponse()
53
    {
54
        $this->assertInstanceOf(
55
            // Response::class, // 5.4 < php
56
            'Symfony\Component\HttpFoundation\Response',
57
            (new TemplatingController(new TwigEngine(
58
                new Twig_Environment(new Twig_Loader_Array(['index.html.twig' => 'Hello World!'])),
59
                new TemplateNameParser()
60
            )))->__invoke()
61
        );
62
    }
63
64
    public function testArrayReturnsResponse()
65
    {

tests/VariadicControllerTest.php 1 location

@@ 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
    {