diff --git a/test/phpunit/AllTests.php b/test/phpunit/AllTests.php index 7958fd5fe38c21000114d3c727e63e7a1841bc24..ae4691ae69499b96cde49dc60f7dad3e513dd533 100644 --- a/test/phpunit/AllTests.php +++ b/test/phpunit/AllTests.php @@ -171,6 +171,12 @@ class AllTests require_once dirname(__FILE__).'/ModulesTest.php'; // At end because it's the longer $suite->addTestSuite('ModulesTest'); + + // GUI + require_once dirname(__FILE__).'/FormAdminTest.php'; + $suite->addTestSuite('FormAdminTest'); + + return $suite; } } diff --git a/test/phpunit/FunctionsTest.php b/test/phpunit/FunctionsTest.php index c58da9efa388734ba646fa5fe1d91339e40755a2..caa798beb46c4edf1a91acd042af01d04ae46662 100755 --- a/test/phpunit/FunctionsTest.php +++ b/test/phpunit/FunctionsTest.php @@ -403,7 +403,13 @@ class FunctionsTest extends PHPUnit_Framework_TestCase { $input="x&<b>#</b>,\"'"; // " will be converted into ' $result=dol_escape_js($input); - $this->assertEquals("x&<b>#<\/b>,\'\'",$result); + $this->assertEquals("x&<b>#</b>,\'\'",$result,"Test mode=0"); + + $result=dol_escape_js($input,1); + $this->assertEquals("x&<b>#</b>,\"\'",$result,"Test mode=1"); + + $result=dol_escape_js($input,2); + $this->assertEquals("x&<b>#</b>,\\\"'",$result,"Test mode=2"); }