Code Duplication    Length = 12-14 lines in 2 locations

Tests/Sniffs/PHP/DeprecatedIniDirectivesSniffTest.php 1 location

@@ 349-362 (lines=14) @@
346
     *
347
     * @return void
348
     */
349
    public function testAlwaysPopulateRawPostData()
350
    {
351
        $file = $this->sniffFile('sniff-examples/deprecated_ini_directives.php', '5.5');
352
        $this->assertNoViolation($file, 80);
353
        $this->assertNoViolation($file, 81);
354
355
        $file = $this->sniffFile('sniff-examples/deprecated_ini_directives.php', '5.6');
356
        $this->assertWarning($file, 80, "INI directive 'always_populate_raw_post_data' is deprecated from PHP 5.6");
357
        $this->assertWarning($file, 81, "INI directive 'always_populate_raw_post_data' is deprecated from PHP 5.6");
358
    
359
        $file = $this->sniffFile('sniff-examples/deprecated_ini_directives.php', '7.0');
360
        $this->assertError($file, 80, "INI directive 'always_populate_raw_post_data' is deprecated from PHP 5.6 and forbidden from PHP 7.0");
361
        $this->assertError($file, 81, "INI directive 'always_populate_raw_post_data' is deprecated from PHP 5.6 and forbidden from PHP 7.0");
362
    }
363
364
    /**
365
     * Test asp_tags setting

Tests/Sniffs/PHP/DeprecatedNewReferenceSniffTest.php 1 location

@@ 23-34 (lines=12) @@
20
     *
21
     * @return void
22
     */
23
    public function testNewReference()
24
    {
25
        $file = $this->sniffFile('sniff-examples/deprecated_new_reference.php', '5.3');
26
        $this->assertNoViolation($file, 8);
27
        $this->assertWarning($file, 9, 'Assigning the return value of new by reference is deprecated in PHP 5.3');
28
        $this->assertWarning($file, 10, 'Assigning the return value of new by reference is deprecated in PHP 5.3');
29
        
30
        $file = $this->sniffFile('sniff-examples/deprecated_new_reference.php', '7.0');
31
        $this->assertNoViolation($file, 8);
32
        $this->assertError($file, 9, 'Assigning the return value of new by reference is deprecated in PHP 5.3 and forbidden in PHP 7.0');
33
        $this->assertError($file, 10, 'Assigning the return value of new by reference is deprecated in PHP 5.3 and forbidden in PHP 7.0');
34
    }
35
36
    /**
37
     * testSettingTestVersion