Skip to content
Snippets Groups Projects
Commit 948f96ec authored by Enzo's avatar Enzo
Browse files

16.12.17 Fix tests

parent b42dbf04
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@ class DetectorTest extends TestCase
{
$detector = new Detector();
$this->assertTrue(
$detector->analyzeString('<?php exe("something") ?>') > 0,
$detector->analyzeString(file_get_contents(__DIR__.'/res/c.php').PHP_EOL.'exe("something")') > 0,
"The detector should return a score > 0 as the test contains"
. "the exe function"
);
......
......@@ -37,6 +37,7 @@ class ExeAnalyzerTest extends TestCase
file_get_contents(__DIR__."/res/test.php")
);
echo "****".$result;
$this->assertTrue(
$result >= 0 && $result <= 1,
"result should be >= 0 and <= 1"
......
......@@ -44,6 +44,6 @@ class SignaturesAnalyzerTest extends TestCase
$this->assertTrue($flag2 != null);
$this->assertTrue(is_double($flag1), "Result should be a number");
$this->assertTrue($flag1 >= 0, "Result should be >= 0");
$this->assertTrue($flag <= 1, "Result should be <= 1");
$this->assertTrue($flag1 <= 1, "Result should be <= 1");
}
}
......@@ -6,5 +6,5 @@ function test()
}
= "test";
echo ;
echo "ls -\`al\`";
$exec= `ls -al`;
exec("date");
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment