%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : www.kowitt.ac.th / Your IP : 216.73.216.118 Web Server : Microsoft-IIS/7.5 System : Windows NT SERVER02 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.6.31 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/phpMyAdmin/test/libraries/ |
Upload File : |
<?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * Test for javascript escaping. * * @package PhpMyAdmin-test */ /* * Include to test. */ require_once 'libraries/js_escape.lib.php'; /** * Test for javascript escaping. * * @package PhpMyAdmin-test */ class PMA_EscapeJsString_Test extends PHPUnit_Framework_TestCase { /** * PMA_escapeJsString tests * * @param string $target expected output * @param string $source string to be escaped * * @return void * @dataProvider escapeDataProvider */ public function testEscape($target, $source) { $this->assertEquals($target, PMA_escapeJsString($source)); } /** * Data provider for testEscape * * @return array data for testEscape test case */ public function escapeDataProvider() { return array( array('\\\';', '\';'), array('\r\n\\\'<scrIpt></\' + \'script>', "\r\n'<scrIpt></sCRIPT>"), array('\\\';[XSS]', '\';[XSS]'), array( '</\' + \'script></head><body>[HTML]', '</SCRIPT></head><body>[HTML]' ), array('\"\\\'\\\\\\\'\"', '"\'\\\'"'), array("\\\\\'\'\'\'\'\'\'\'\'\'\'\'\\\\", "\\''''''''''''\\") ); } }