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