/** * * @runInSeparateProcess */ function testInstall() { global $dataDir; //make sure it's not installed $config_file = $dataDir . '/data/_site/config.php'; self::AssertFileNotExists($config_file, 'Cannot test installation (Already Installed)'); //mimic POST $_POST = array(); $_POST['email'] = '*****@*****.**'; $_POST['username'] = '******'; $_POST['password'] = '******'; $_POST['password1'] = $_POST['password']; //attempt to install ob_start(); $success = \gp\install\Tools::Install_DataFiles_New(); ob_get_clean(); self::AssertTrue($success, 'Installation Failed'); //double check self::AssertFileExists($config_file); }
public function Install_Normal() { global $langmessage, $install_language; echo '<h2>' . $langmessage['Installing'] . '</h2>'; echo '<ul class="install_status">'; $config = array(); $config['language'] = $install_language; $success = false; if (\gp\install\Tools::gpInstall_Check()) { $success = \gp\install\Tools::Install_DataFiles_New(false, $config); } echo '</ul>'; return $success; }