Code Duplication    Length = 17-17 lines in 7 locations

tests/Framework/DefaultControllerTest.php 3 locations

@@ 16-32 (lines=17) @@
13
14
class DefaultControllerTest extends WebTestCase
15
{
16
    public function testIndex()
17
    {
18
        if ('3.4.0' <= Symfony\Component\HttpKernel\Kernel::VERSION) {
19
            $this->markTestIncomplete();
20
        } // Test does not work any more with Symfony 3.4
21
22
        $client = static::createClient();
23
24
        $crawler = $client->request('GET', '/');
25
26
        $this->assertSame(
27
            200, // or Symfony\Component\HttpFoundation\Response::HTTP_OK,
28
            $client->getResponse()->getStatusCode()
29
        );
30
31
        $this->assertContains('Hello Component!', $client->getResponse()->getContent());
32
    }
33
34
    public function testArgument()
35
    {
@@ 34-50 (lines=17) @@
31
        $this->assertContains('Hello Component!', $client->getResponse()->getContent());
32
    }
33
34
    public function testArgument()
35
    {
36
        if ('3.4.0' <= Symfony\Component\HttpKernel\Kernel::VERSION) {
37
            $this->markTestIncomplete();
38
        } // Test does not work any more with Symfony 3.4
39
40
        $client = static::createClient();
41
42
        $crawler = $client->request('GET', '/argument');
43
44
        $this->assertSame(
45
            200, // or Symfony\Component\HttpFoundation\Response::HTTP_OK,
46
            $client->getResponse()->getStatusCode()
47
        );
48
49
        $this->assertContains('Hello Component!', $client->getResponse()->getContent());
50
    }
51
52
    public function testConstructor()
53
    {
@@ 52-68 (lines=17) @@
49
        $this->assertContains('Hello Component!', $client->getResponse()->getContent());
50
    }
51
52
    public function testConstructor()
53
    {
54
        if ('3.4.0' <= Symfony\Component\HttpKernel\Kernel::VERSION) {
55
            $this->markTestIncomplete();
56
        } // Test does not work any more with Symfony 3.4
57
58
        $client = static::createClient();
59
60
        $crawler = $client->request('GET', '/constructor');
61
62
        $this->assertSame(
63
            200, // or Symfony\Component\HttpFoundation\Response::HTTP_OK,
64
            $client->getResponse()->getStatusCode()
65
        );
66
67
        $this->assertContains('Hello Component!', $client->getResponse()->getContent());
68
    }
69
}
70

tests/FrameworkTwig/DefaultControllerTest.php 4 locations

@@ 24-40 (lines=17) @@
21
        );
22
    }
23
24
    public function testIndex()
25
    {
26
        if ('3.4.0' <= Symfony\Component\HttpKernel\Kernel::VERSION) {
27
            $this->markTestIncomplete();
28
        } // Test does not work any more with Symfony 3.4
29
30
        $client = static::createClient();
31
32
        $crawler = $client->request('GET', '/');
33
34
        $this->assertSame(
35
            200, // or Symfony\Component\HttpFoundation\Response::HTTP_OK,
36
            $client->getResponse()->getStatusCode()
37
        );
38
39
        $this->assertContains('Hello World!', $client->getResponse()->getContent());
40
    }
41
42
    public function testArgument()
43
    {
@@ 42-58 (lines=17) @@
39
        $this->assertContains('Hello World!', $client->getResponse()->getContent());
40
    }
41
42
    public function testArgument()
43
    {
44
        if ('3.4.0' <= Symfony\Component\HttpKernel\Kernel::VERSION) {
45
            $this->markTestIncomplete();
46
        } // Test does not work any more with Symfony 3.4
47
48
        $client = static::createClient();
49
50
        $crawler = $client->request('GET', '/argument');
51
52
        $this->assertSame(
53
            200, // or Symfony\Component\HttpFoundation\Response::HTTP_OK,
54
            $client->getResponse()->getStatusCode()
55
        );
56
57
        $this->assertContains('Hello World!', $client->getResponse()->getContent());
58
    }
59
60
    public function testConstructor()
61
    {
@@ 60-76 (lines=17) @@
57
        $this->assertContains('Hello World!', $client->getResponse()->getContent());
58
    }
59
60
    public function testConstructor()
61
    {
62
        if ('3.4.0' <= Symfony\Component\HttpKernel\Kernel::VERSION) {
63
            $this->markTestIncomplete();
64
        } // Test does not work any more with Symfony 3.4
65
66
        $client = static::createClient();
67
68
        $crawler = $client->request('GET', '/constructor');
69
70
        $this->assertSame(
71
            200, // or Symfony\Component\HttpFoundation\Response::HTTP_OK,
72
            $client->getResponse()->getStatusCode()
73
        );
74
75
        $this->assertContains('Hello World!', $client->getResponse()->getContent());
76
    }
77
78
    public function testVariadic()
79
    {
@@ 78-94 (lines=17) @@
75
        $this->assertContains('Hello World!', $client->getResponse()->getContent());
76
    }
77
78
    public function testVariadic()
79
    {
80
        if ('3.4.0' <= Symfony\Component\HttpKernel\Kernel::VERSION) {
81
            $this->markTestIncomplete();
82
        } // Test does not work any more with Symfony 3.4
83
84
        $client = static::createClient();
85
86
        $crawler = $client->request('GET', '/variadic/request');
87
88
        $this->assertSame(
89
            200, // or Symfony\Component\HttpFoundation\Response::HTTP_OK,
90
            $client->getResponse()->getStatusCode()
91
        );
92
93
        $this->assertContains('Hello World!', $client->getResponse()->getContent());
94
    }
95
}
96