Code Duplication    Length = 13-14 lines in 4 locations

src/Graviton/FileBundle/Tests/Controller/FileControllerTest.php 1 location

@@ 52-65 (lines=14) @@
49
     *
50
     * @return void
51
     */
52
    public function testFindAllEmptyCollection()
53
    {
54
        // reset fixtures since we already have some from setUp
55
        $this->loadFixtures(array(), null, 'doctrine_mongodb');
56
        $client = static::createRestClient();
57
        $client->request('GET', '/file/');
58
59
        $response = $client->getResponse();
60
        $results = $client->getResults();
61
62
        $this->assertResponseContentType(self::COLLECTION_TYPE, $response);
63
64
        $this->assertEquals(array(), $results);
65
    }
66
67
    /**
68
     * validate that we can post a new file

src/Graviton/CoreBundle/Tests/Controller/AppControllerTest.php 1 location

@@ 298-311 (lines=14) @@
295
     *
296
     * @return void
297
     */
298
    public function testFindAllEmptyCollection()
299
    {
300
        // reset fixtures since we already have some from setUp
301
        $this->loadFixtures(array(), null, 'doctrine_mongodb');
302
        $client = static::createRestClient();
303
        $client->request('GET', '/core/app/');
304
305
        $response = $client->getResponse();
306
        $results = $client->getResults();
307
308
        $this->assertResponseContentType(self::COLLECTION_TYPE, $response);
309
310
        $this->assertEquals(array(), $results);
311
    }
312
313
    /**
314
     * test if we can get an app by id

src/Graviton/SchemaBundle/Tests/Controller/RecordOriginConstraintTest.php 1 location

@@ 111-123 (lines=13) @@
108
     *
109
     * @return void
110
     */
111
    public function testRecordOriginHandlingOnPatch(
112
        $ops,
113
        $expectedStatus,
114
        $expectedResponse
115
    ) {
116
        $client = static::createRestClient();
117
118
        $client->request('PATCH', '/person/customer/100', [], [], [], json_encode($ops));
119
120
        $response = $client->getResponse();
121
        $this->assertEquals($expectedStatus, $response->getStatusCode());
122
        $this->assertEquals($expectedResponse, $client->getResults());
123
    }
124
125
    /**
126
     * test to see if DELETE on a recordorigin: core is denied

src/Graviton/CoreBundle/Tests/Controller/ModuleControllerTest.php 1 location

@@ 124-137 (lines=14) @@
121
     *
122
     * @return void
123
     */
124
    public function testFindAllEmptyCollection()
125
    {
126
        // reset fixtures since we already have some from setUp
127
        $this->loadFixtures(array(), null, 'doctrine_mongodb');
128
        $client = static::createRestClient();
129
        $client->request('GET', '/core/module/');
130
131
        $response = $client->getResponse();
132
        $results = $client->getResults();
133
134
        $this->assertResponseContentType(self::COLLECTION_TYPE, $response);
135
136
        $this->assertEquals(array(), $results);
137
    }
138
139
    /**
140
     * test if we can get an module first by key and then its id (id is dynamic)