Code Duplication    Length = 8-16 lines in 5 locations

src/Starkerxp/CampaignBundle/Tests/Controller/CampaignControllerTest.php 2 locations

@@ 42-49 (lines=8) @@
39
     * @group post
40
     * @group controller
41
     */
42
    public function testPostInvalide()
43
    {
44
        $this->loadFixtureFiles(
45
            [
46
                '@StarkerxpUserBundle/Tests/DataFixtures/UserManager/DefaultUser.yml',
47
48
            ]
49
        );
50
        $client = $this->getAuthClient();
51
        $client->request('POST', '/api/campaigns', []);
52
        $response = $client->getResponse();
@@ 262-273 (lines=12) @@
259
     * @group get
260
     * @group controller
261
     */
262
    public function testGetInvalide()
263
    {
264
        $this->loadFixtureFiles(
265
            [
266
                '@StarkerxpUserBundle/Tests/DataFixtures/UserManager/DefaultUser.yml',
267
268
            ]
269
        );
270
        $client = $this->getAuthClient();
271
        $client->request('GET', '/api/campaigns/500', ["filter_erreur" => "+h"]);
272
        $response = $client->getResponse();
273
        $this->assertEquals(400, $response->getStatusCode());
274
    }
275
276
    /**

src/Starkerxp/CampaignBundle/Tests/Controller/TemplateControllerTest.php 2 locations

@@ 200-209 (lines=10) @@
197
     * @group cget
198
     * @group controller
199
     */
200
    public function testCGetInvalide()
201
    {
202
        $this->loadFixtureFiles(
203
            [
204
                '@StarkerxpUserBundle/Tests/DataFixtures/UserManager/DefaultUser.yml',
205
206
            ]
207
        );
208
        $client = $this->getAuthClient();
209
        $client->request('GET', '/api/templates', ["filter_erreur" => "+h"]);
210
        $response = $client->getResponse();
211
        $this->assertEquals(400, $response->getStatusCode());
212
    }
@@ 270-279 (lines=10) @@
267
     * @group get
268
     * @group controller
269
     */
270
    public function testGetInvalide()
271
    {
272
        $this->loadFixtureFiles(
273
            [
274
                '@StarkerxpUserBundle/Tests/DataFixtures/UserManager/DefaultUser.yml',
275
276
            ]
277
        );
278
        $client = $this->getAuthClient();
279
        $client->request('GET', '/api/templates/500', ["filter_erreur" => "+h"]);
280
        $response = $client->getResponse();
281
        $this->assertEquals(400, $response->getStatusCode());
282
    }

src/Starkerxp/LeadBundle/Tests/Controller/LeadControllerTest.php 1 location

@@ 238-253 (lines=16) @@
235
     * @group cget
236
     * @group controller
237
     */
238
    public function testCGetInvalide()
239
    {
240
        $this->loadFixtureFiles(
241
            [
242
                '@StarkerxpUserBundle/Tests/DataFixtures/UserManager/DefaultUser.yml',
243
244
            ]
245
        );
246
        $url = $this->generateUrl(
247
            'starkerxp_lead.lead.cget',
248
            [
249
250
            ]
251
        );
252
        $client = $this->getAuthClient();
253
        $client->request('GET', $url, ["filter_erreur" => "+h"]);
254
        $response = $client->getResponse();
255
        $this->assertEquals(400, $response->getStatusCode());
256
    }