Package org.sonar.plugins.php.api.tests
Class PHPCheckTest
java.lang.Object
org.sonar.plugins.php.api.tests.PHPCheckTest
Helper class for checks unit test.
Code sample file: code_sample.php
When an issue is expected on a line, it should contains a comment as the following
<?php
$a = 1; // NOK {{expected issue message}}
$a = 2; // NOK
-
Method Summary
-
Method Details
-
check
Verifies that the given check raises issue as expected.- Parameters:
check- the tested checkfile- File containing the php code sample annotated with comment for expected issues.
-
check
Verifies that the given check raises issue as expected.- Parameters:
check- the tested checkfile- File containing the php code sampleexpectedIssues- expected issues that should be raise. Overrides the comments in the code sample.
-