Skip to content
Snippets Groups Projects
Commit 1305d0b7 authored by Enzo's avatar Enzo
Browse files

Ajout de /doc & /tests/res. Début de détection de sign. basée sur PHPWebshellDetector

parent 95fa9cab
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,11 @@ namespace Tests;
require_once __DIR__."/../src/util.php";
use PHPUnit\Framework\TestCase;
use \AnalyzerNS as util;
use function \AnalyzerNS\removeAllWhiteSpaces;
use function \AnalyzerNS\removeWhiteSpacesOutsideString;
use function AnalyzerNS\removeCRLF;
use function AnalyzerNS\removeMultiWhiteSpaces;
class UtilTest extends TestCase
{
......@@ -21,28 +25,28 @@ class UtilTest extends TestCase
public function testRemoveCRLF()
{
foreach ($this->strings as $string) {
$this->assertTrue(util\removeCRLF($string) !== $string);
$this->assertTrue(removeCRLF($string) !== $string);
}
}
public function testRemoveMultiWhiteSpaces()
{
foreach ($this->strings as $string) {
$this->assertTrue(util\removeMultiWhiteSpaces($string) !== $string);
$this->assertTrue(removeMultiWhiteSpaces($string) !== $string);
}
}
public function testRemoveAllWhiteSpaces()
{
foreach ($this->strings as $string) {
$this->assertTrue(util\removeAllWhiteSpaces($string) !== $string);
$this->assertTrue(removeAllWhiteSpaces($string) !== $string);
}
}
public function testRemoveWhiteSpacesOutsideString()
{
foreach ($this->strings as $string) {
$this->assertTrue(util\removeWhiteSpacesOutsideString(token_get_all($string)) !== $string);
$this->assertTrue(removeWhiteSpacesOutsideString(token_get_all($string)) !== $string);
}
}
}
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