Code Duplication    Length = 16-16 lines in 2 locations

Tests/Sniffs/PHP/ForbiddenGlobalVariableVariableSniffTest.php 1 location

@@ 16-31 (lines=16) @@
13
 * @package PHPCompatibility
14
 * @author Wim Godden <[email protected]>
15
 */
16
class ForbiddenGlobalVariableVariableSniffTest extends BaseSniffTest
17
{
18
    /**
19
     * Verify that checking for a specific version works
20
     *
21
     * @return void
22
     */
23
    public function testGlobalVariableVariable()
24
    {
25
        $file = $this->sniffFile('sniff-examples/forbidden_global_variable_variable.php', '5.6');
26
        $this->assertNoViolation($file, 3);
27
        
28
        $file = $this->sniffFile('sniff-examples/forbidden_global_variable_variable.php', '7.0');
29
        $this->assertError($file, 3, "Global with variable variables are not allowed since PHP 7.0");
30
    }
31
}
32

Tests/Sniffs/PHP/ForbiddenFunctionParametersWithSameNameSniffTest.php 1 location

@@ 16-31 (lines=16) @@
13
 * @package PHPCompatibility
14
 * @author Wim Godden <[email protected]>
15
 */
16
class ForbiddenForbiddenFunctionParametersWithSameNameSniffTest extends BaseSniffTest
17
{
18
    /**
19
     * testSettingTestVersion
20
     *
21
     * @return void
22
     */
23
    public function testSettingTestVersion()
24
    {
25
        $file = $this->sniffFile('sniff-examples/forbidden_function_parameters_with_same_name.php', '5.6');
26
        $this->assertNoViolation($file, 3);
27
        
28
        $file = $this->sniffFile('sniff-examples/forbidden_function_parameters_with_same_name.php', '7.0');
29
        $this->assertError($file, 3, 'Functions can not have multiple parameters with the same name since PHP 7.0');
30
    }
31
}
32
33