/** * Creates a new class instance */ private function __construct() { if (!defined('TESTSUITE')) { $buffer = PMA_OutputBuffering::getInstance(); $buffer->start(); } $this->_header = new PMA_Header(); $this->_HTML = ''; $this->_JSON = array(); $this->_footer = new PMA_Footer(); $this->_isSuccess = true; $this->_isAjax = false; $this->_isAjaxPage = false; if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) { $this->_isAjax = true; } if (isset($_REQUEST['ajax_page_request']) && $_REQUEST['ajax_page_request'] == true) { $this->_isAjaxPage = true; } $this->_header->setAjax($this->_isAjax); $this->_footer->setAjax($this->_isAjax); $this->_CWD = getcwd(); }
/** * Test for footer when ajax enabled * * @return void */ public function testAjax() { $footer = new PMA_Footer(); $footer->setAjax(true); $this->assertEquals('', $footer->getDisplay()); }