/** * Testing view::setMessage() * * @return null */ public function testSetMessage() { $oSetupView = new View(); $oSetupView->setMessage("msg1"); $this->assertEquals(array("msg1"), $oSetupView->getMessages()); $oSetupView->setMessage("msg2"); $this->assertEquals(array("msg1", "msg2"), $oSetupView->getMessages()); $oSetupView->setMessage("msg3", true); $this->assertEquals(array("msg3"), $oSetupView->getMessages()); }
/** * Show warning-question if database with same name already exists. * * @param string $sDBName name of database to check if exist * @param View $oView to set parameters for template * @param Language $oLang to translate text * @param string $sSessionId * @param string $sStep where to redirect if chose to rewrite database */ private function formMessageIfDBCanBeOverwritten($sDBName, $oView, $oLang, $sSessionId, $sStep) { $oView->setMessage(sprintf($oLang->getText('ERROR_DB_ALREADY_EXISTS'), $sDBName) . "<br><br>" . $oLang->getText('STEP_4_2_OVERWRITE_DB') . " <a href=\"index.php?sid=" . $sSessionId . "&istep=" . $sStep . "&ow=1\" id=\"step3Continue\" style=\"text-decoration: underline;\">" . $oLang->getText('HERE') . "</a>"); }