Code Duplication    Length = 9-9 lines in 6 locations

src/Common/tests/Api/ApiTest.php 6 locations

@@ 17-25 (lines=9) @@
14
        });
15
    }
16
17
    public function testGet()
18
    {
19
        $this->setup200Response();
20
21
        $api = new Api($this->httpClient, $this->hydrator, $this->requestBuilder);
22
        $response = $api->getMethod();
23
24
        $this->assertEquals(200, $response->getStatusCode());
25
    }
26
27
    public function testPost()
28
    {
@@ 27-35 (lines=9) @@
24
        $this->assertEquals(200, $response->getStatusCode());
25
    }
26
27
    public function testPost()
28
    {
29
        $this->setup200Response();
30
31
        $api = new Api($this->httpClient, $this->hydrator, $this->requestBuilder);
32
        $response = $api->postMethod();
33
34
        $this->assertEquals(200, $response->getStatusCode());
35
    }
36
37
    public function testPostRaw()
38
    {
@@ 37-45 (lines=9) @@
34
        $this->assertEquals(200, $response->getStatusCode());
35
    }
36
37
    public function testPostRaw()
38
    {
39
        $this->setup200Response();
40
41
        $api = new Api($this->httpClient, $this->hydrator, $this->requestBuilder);
42
        $response = $api->postRawMethod();
43
44
        $this->assertEquals(200, $response->getStatusCode());
45
    }
46
47
    public function testPut()
48
    {
@@ 47-55 (lines=9) @@
44
        $this->assertEquals(200, $response->getStatusCode());
45
    }
46
47
    public function testPut()
48
    {
49
        $this->setup200Response();
50
51
        $api = new Api($this->httpClient, $this->hydrator, $this->requestBuilder);
52
        $response = $api->putMethod();
53
54
        $this->assertEquals(200, $response->getStatusCode());
55
    }
56
57
    public function testPatch()
58
    {
@@ 57-65 (lines=9) @@
54
        $this->assertEquals(200, $response->getStatusCode());
55
    }
56
57
    public function testPatch()
58
    {
59
        $this->setup200Response();
60
61
        $api = new Api($this->httpClient, $this->hydrator, $this->requestBuilder);
62
        $response = $api->patchMethod();
63
64
        $this->assertEquals(200, $response->getStatusCode());
65
    }
66
67
    public function testDelete()
68
    {
@@ 67-75 (lines=9) @@
64
        $this->assertEquals(200, $response->getStatusCode());
65
    }
66
67
    public function testDelete()
68
    {
69
        $this->setup200Response();
70
71
        $api = new Api($this->httpClient, $this->hydrator, $this->requestBuilder);
72
        $response = $api->deleteMethod();
73
74
        $this->assertEquals(200, $response->getStatusCode());
75
    }
76
77
    /**
78
     * @expectedException \IBM\Watson\Common\Exception\Domain\InsufficientPrivilegesException