Code Duplication    Length = 12-12 lines in 2 locations

Tests/Sniffs/PHP/DeprecatedNewReferenceSniffTest.php 1 location

@@ 29-40 (lines=12) @@
26
     *
27
     * @return void
28
     */
29
    public function testDeprecatedNewReference($line)
30
    {
31
        $file = $this->sniffFile(self::TEST_FILE, '5.2');
32
        $this->assertNoViolation($file, $line);
33
34
        $file = $this->sniffFile(self::TEST_FILE, '5.3');
35
        $this->assertWarning($file, $line, 'Assigning the return value of new by reference is deprecated in PHP 5.3');
36
37
        $file = $this->sniffFile(self::TEST_FILE, '7.0');
38
        $this->assertError($file, $line, 'Assigning the return value of new by reference is deprecated in PHP 5.3 and forbidden in PHP 7.0');
39
40
    }
41
42
    /**
43
     * Data provider.

Tests/Sniffs/PHP/ValidIntegersSniffTest.php 1 location

@@ 155-166 (lines=12) @@
152
     *
153
     * @return void
154
     */
155
    public function testHexNumericString()
156
    {
157
        $error = 'The behaviour of hexadecimal numeric strings was inconsistent prior to PHP 7 and support has been removed in PHP 7. Found: \'0xaa78b5\'';
158
159
        $file = $this->sniffFile(self::TEST_FILE, '5.0');
160
        $this->assertWarning($file, 11, $error);
161
        $this->assertNoViolation($file, 12);
162
163
        $file = $this->sniffFile(self::TEST_FILE, '7.0');
164
        $this->assertError($file, 11, $error);
165
        $this->assertNoViolation($file, 12);
166
    }
167
168
}
169