Dotclear

source: travis/install.php @ 2931:eed943c66a5f

Revision 2931:eed943c66a5f, 767 bytes checked in by Nicolas <nikrou77@…>, 11 years ago (diff)

Start adding behat tests

Line 
1<?php
2if (!empty($_SERVER['argv'][1]) && in_array($_SERVER['argv'][1], array('mysql','sqlite','pgsql'))
3   && is_readable(__DIR__.'/conf/config_'.$_SERVER['argv'][1].'.php')) {
4
5    $_SERVER['DC_RC_PATH'] = __DIR__.'/conf/config_'.$_SERVER['argv'][1].'.php';
6} else {
7    $_SERVER['DC_RC_PATH'] = __DIR__.'/../inc/config.php';
8}
9
10if (empty($_SERVER['DC_RC_PATH'])) {
11    die('You must define DC_RC_PATH');
12}
13$_SERVER['REQUEST_URI'] = 'http://localhost:1080';
14$_SERVER['HTTP_HOST'] = 'http';
15$_SERVER['SERVER_PORT'] = '1080';
16
17$tmp_pwd = md5(uniqid());  // don't care, user will be deleted
18$_POST = array(
19    'u_login' => 'admin',
20    'u_pwd' =>  $tmp_pwd,
21    'u_pwd2' => $tmp_pwd
22);
23
24ob_start();
25require_once(__DIR__.'/../admin/install/index.php');
26ob_end_clean();
Note: See TracBrowser for help on using the repository browser.

Sites map