phpcheck.demo.php Total: 17 Tests, 4 Errors
PHPCheck V1.3.20, OS: Linux, PHP-Version: 7.2.20 (64 Bit), Time: 0.00 s, Memory: 2.0M (128M)
CommentLineCodeResultTest
check phpcheck Instance 17 $t->check($t instanceof phpchecktrue);  [0.0 ms]
true
Ok
Test 2 18
//check without ->start
$result 4;
$expect 9;
$t->check($result$result === $expect); 
[0.0 ms]
9
Ok
check: ok, simple addition 25 $result 4;
$expect 9;
$t->check($result$result === $expect); 
[0.0 ms]
9
Ok
check: error 30 $result 4;
$expect 9;
$t->check($result$result === $expect); 
7
Error
checkEqual:ok, simple addition 35 $result 4;
$expect 9;
$t->checkEqual($result$expect); 
9 Ok
checkEqual:error 40 $result 4;
$expect "9";
//error: $result is a integer, string expect 
$t->checkEqual($result$expect); 
9
Error
checkEqual:error 46 $result 1/3;
$expect 0.33333333;
$t->checkEqual($result$expect); 
[0.0 ms]
0.3333333333333333
Error
checkEqual: ok, compare with delta 51 $result 1/3;
$expect 0.33333333;
$delta =  0.00000001;
$t->checkEqual($result$expect,""$delta); 
0.3333333333333333 Ok
checkEqualHex: ok 57 $result "abc\n";
$expect "abc\x0a";
$t->checkEqualHex($result$expect); 
[0.0 ms]
'\\x61\\x62\\x63\\x0a'
Ok
checkHTML: ok 62 $t->setResultFilter("html");
$result "<b>Fett</b>";
$t->checkHTML($result); 
[0.0 ms]
Fett
Ok
checkHTML: false, invalid HTML 67 $t->setResultFilter();  //default
$result "<b>Fett";
$t->checkHTML($result); 
'<b>Fett'
Error
Test 12 79 $expected 20;
$result Closure::__set_state(array(
))(
4,5); 
[0.0 ms]
20
Ok
Test 13 79 $expected = -10;
$result Closure::__set_state(array(
))(-
2,5); 
-10 Ok
start Output: 1 82 echo "A Message";
$t->checkOutput("A Message"); 
'A Message' Ok
start Output: 2 86 echo "<p>A Message</p>";
$t->checkHTML(null"A Message"); 
[0.0 ms]
'<p>A Message</p>'
Ok
Output a input text field1 90 $t->setResultFilter("html");
echo 
'<input name="field1" >';  
$t->checkHTML(null); 
Ok
check $_POST 95 $result $_POST;
$testOk = (
  empty(
$_POST//first Call
  
OR isset($_POST["field1"])  //after Send Form
);
$t->check($result$testOk); 
[0.0 ms]
array (
)
Ok
Cycle:1