/** * Test for PMA_displayErrors() * * @return void */ public function testDisplayErrors() { $errors = array('<err1>', '&err2'); $result = PMA_displayErrors('err"Name1"', $errors); $this->assertEquals('<dl><dt>err"Name1"</dt>' . '<dd><err1></dd><dd>&err2</dd></dl>', $result); }
/** * Displays errors * * @return string HTML for errors */ public function displayErrors() { $this->_validate(); if (count($this->_errors) == 0) { return null; } $htmlOutput = ''; foreach ($this->_errors as $system_path => $error_list) { if (isset($this->_systemPaths[$system_path])) { $path = $this->_systemPaths[$system_path]; $name = PMA_langName($path); } else { $name = $GLOBALS["strConfigForm_{$system_path}"]; } $htmlOutput .= PMA_displayErrors($name, $error_list); } return $htmlOutput; }
/** * Test for PMA_displayErrors() * * @return void */ public function testDisplayErrors() { $errors = array('<err1>', '&err2'); $this->expectOutputString( '<dl><dt>err"Name1"</dt>' . '<dd><err1></dd><dd>&err2</dd></dl>' ); PMA_displayErrors('err"Name1"', $errors); }