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/ModuleControllerTest.php 1 location

@@ 178-191 (lines=14) @@
175
     *
176
     * @return void
177
     */
178
    public function testFindAllEmptyCollection()
179
    {
180
        // reset fixtures since we already have some from setUp
181
        $this->loadFixtures(array(), null, 'doctrine_mongodb');
182
        $client = static::createRestClient();
183
        $client->request('GET', '/core/module/');
184
185
        $response = $client->getResponse();
186
        $results = $client->getResults();
187
188
        $this->assertResponseContentType(self::COLLECTION_TYPE, $response);
189
190
        $this->assertEquals(array(), $results);
191
    }
192
193
    /**
194
     * test if we can get an module first by key and then its id (id is dynamic)

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

@@ 361-374 (lines=14) @@
358
     *
359
     * @return void
360
     */
361
    public function testFindAllEmptyCollection()
362
    {
363
        // reset fixtures since we already have some from setUp
364
        $this->loadFixtures(array(), null, 'doctrine_mongodb');
365
        $client = static::createRestClient();
366
        $client->request('GET', '/core/app/');
367
368
        $response = $client->getResponse();
369
        $results = $client->getResults();
370
371
        $this->assertResponseContentType(self::COLLECTION_TYPE, $response);
372
373
        $this->assertEquals(array(), $results);
374
    }
375
376
    /**
377
     * test if we can get an app by id

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

@@ 141-153 (lines=13) @@
138
     *
139
     * @return void
140
     */
141
    public function testRecordOriginHandlingOnPatch(
142
        $ops,
143
        $expectedStatus,
144
        $expectedResponse
145
    ) {
146
        $client = static::createRestClient();
147
148
        $client->request('PATCH', '/person/customer/100', [], [], [], json_encode($ops));
149
150
        $response = $client->getResponse();
151
        $this->assertEquals($expectedStatus, $response->getStatusCode());
152
        $this->assertEquals($expectedResponse, $client->getResults());
153
    }
154
155
    /**
156
     * test to see if DELETE on a recordorigin: core is denied