1); $GLOBALS['pmaThemeImage'] = 'theme/'; $GLOBALS['text_dir'] = 'ltr'; } /** * Test for checkParameters * * @return void */ function testCheckParameterMissing() { $GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF'); $GLOBALS['pmaThemePath'] = $_SESSION['PMA_Theme']->getPath(); $this->expectOutputRegex("/Missing parameter: field/"); PMA\libraries\Util::checkParameters( array('db', 'table', 'field') ); } /** * Test for checkParameters * * @return void */ function testCheckParameter() { $GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF'); $GLOBALS['pmaThemePath'] = $_SESSION['PMA_Theme']->getPath(); $GLOBALS['db'] = "dbDatabase"; $GLOBALS['table'] = "tblTable"; $GLOBALS['field'] = "test_field"; $GLOBALS['sql_query'] = "SELECT * FROM tblTable;"; $this->expectOutputString(""); PMA\libraries\Util::checkParameters( array('db', 'table', 'field', 'sql_query') ); } }