Code Duplication    Length = 12-12 lines in 3 locations

tests/Sniffs/ControlStructures/YodaCondition/YodaConditionSniffTest.php 1 location

@@ 12-23 (lines=12) @@
9
use ZenifyCodingStandard\Sniffs\ControlStructures\YodaConditionSniff;
10
11
12
final class YodaConditionSniffTest extends TestCase
13
{
14
15
	public function testDetection()
16
	{
17
		$codeSnifferRunner = new CodeSnifferRunner(YodaConditionSniff::NAME);
18
19
		$this->assertSame(5, $codeSnifferRunner->getErrorCountInFile(__DIR__ . '/wrong.php'));
20
		$this->assertSame(0, $codeSnifferRunner->getErrorCountInFile(__DIR__ . '/correct.php'));
21
	}
22
23
}
24

tests/Sniffs/Debug/DebugFunctionCall/DebugFunctionCallSniffTest.php 1 location

@@ 12-23 (lines=12) @@
9
use ZenifyCodingStandard\Sniffs\Debug\DebugFunctionCallSniff;
10
11
12
final class DebugFunctionCallSniffTest extends TestCase
13
{
14
15
	public function testDetection()
16
	{
17
		$codeSnifferRunner = new CodeSnifferRunner(DebugFunctionCallSniff::NAME);
18
19
		$this->assertSame(1, $codeSnifferRunner->getErrorCountInFile(__DIR__ . '/wrong.php'));
20
		$this->assertSame(0, $codeSnifferRunner->getErrorCountInFile(__DIR__ . '/correct.php'));
21
	}
22
23
}
24

tests/Sniffs/Namespaces/ClassNamesWithoutPreSlash/ClassNamesWithoutPreSlashSniffTest.php 1 location

@@ 12-23 (lines=12) @@
9
use ZenifyCodingStandard\Sniffs\Namespaces\ClassNamesWithoutPreSlashSniff;
10
11
12
final class ClassNamesWithoutPreSlashSniffTest extends TestCase
13
{
14
15
	public function testDetection()
16
	{
17
		$codeSnifferRunner = new CodeSnifferRunner(ClassNamesWithoutPreSlashSniff::NAME);
18
19
		$this->assertSame(1, $codeSnifferRunner->getErrorCountInFile(__DIR__ . '/wrong.php'));
20
		$this->assertSame(0, $codeSnifferRunner->getErrorCountInFile(__DIR__ . '/correct.php'));
21
	}
22
23
}
24