/** * Test the standard output of shn_install_stream_init() method. */ public function test_shn_install_stream_init() { shn_install_stream_init(); ob_end_flush(); $this->expectOutputString('<body><div id="container"><div id="header" class="clearfix"><div id="leftHeaderLogo"><a href=""> <img id="leftHeaderLogoImg" src="theme/vesuvius2/img/vesuvius.png" alt="Vesuvius Logo"></a> </div><div id="rightHeaderLogo"> <a href="http://www.nlm.nih.gov/"><img src="theme/vesuvius2/img/sahana_vesuvius.png" alt="Sahana Vesuvius Logo"> </a></div></div> <div id="headerText"> <h1><sup>™</sup></h1> <h3> </h3> <h4></h4> <h4><a href="">http://sahanafoundation.org</a></h4> </div> <div id="wrapper" class="clearfix"><div id="wrapper_menu"><div id="menuwrap"><ul id="menu"></ul></div></div><div id="content"><div style="padding: 20px 0px 0px 36px; font-size: 16px;">'); }
/** * Run the installer */ function shn_run_installer() { global $global; $global['theme'] = $theme = 'vesuvius2'; include_once($global['approot'].'/www/theme/'.$theme.'/head.php'); //load the head tag shn_theme_head(); include_once($global['approot'].'/mod/install/main.inc'); include_once($global['approot'].'/mod/install/SHN_ConfigurationGenerator.php'); $confGenerator = new SHN_ConfigurationGenerator($global['approot']); shn_install_stream_init(); $global["root_dir"]=dirname($_SERVER["PHP_SELF"]); if (!isset($_GET['act']) && !isset($_GET['mod']) ) { shn_install_default($confGenerator); } else { if (isset($_GET['act']) && isset($_GET['mod'])) { if ($_GET['act']=='conf' && $_GET['mod']=='install') { $confGenerator->installConf(); } else { header("Location: $global[root_dir]"); } } else { header("Location: $global[root_dir]"); } } shn_install_stream_close(); }