Code Duplication    Length = 15-20 lines in 2 locations

tests/AppBundle/Controller/Api/SurveyControllerTest.php 1 location

@@ 61-80 (lines=20) @@
58
        $this->assertTrue($client->getResponse()->isSuccessful(), 'response status is 2xx');
59
    }
60
61
    public function testApiSurveyUpdate()
62
    {
63
        $client = static::createClient();
64
65
        $client->request('POST', '/api/survey/update/3');
66
67
        $this->assertEquals(401, $client->getResponse()->getStatusCode());
68
69
        $client->request(
70
            'POST',
71
            '/api/survey/update/3',
72
            array(),
73
            array(),
74
            array('CONTENT_TYPE' => 'application/json',
75
                  'HTTP_X-AUTH-TOKEN' => '1', ),
76
            $content = '{"3":"yes"}'
77
        );
78
79
        $this->assertEquals(200, $client->getResponse()->getStatusCode());
80
    }
81
}
82

tests/AppBundle/Controller/SurveyControllerTest.php 1 location

@@ 21-35 (lines=15) @@
18
        $this->assertEquals(200, $client->getResponse()->getStatusCode());
19
    }
20
21
    public function testSurvey()
22
    {
23
        $client = static::createClient();
24
25
        $crawler = $client->request('GET', '/survey/1', array(), array(), array(
26
            'PHP_AUTH_USER' => '[email protected]',
27
            'PHP_AUTH_PW' => 'admin',
28
        ));
29
30
        $this->assertEquals(200, $client->getResponse()->getStatusCode());
31
32
        $this->assertEquals(1, $crawler
33
            ->filter('h3:contains("Internship survey")')
34
            ->count());
35
    }
36
37
    public function testSurveyCreate()
38
    {