This repository has been archived by the owner on May 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfigcloud.php
executable file
·73 lines (59 loc) · 1.9 KB
/
configcloud.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
unset($CFG);
global $CFG;
$CFG = new stdClass();
$phpport = 7000;
if (getenv('PHPPORT')) { // set by behat tests
$phpport = getenv('PHPPORT');
} elseif (getenv('PHPUNITTEST')) { // set by phpunit tests
$phpport = getenv('PHPUNITTEST');
} elseif (!empty($_SERVER['SERVER_PORT'])) {
$phpport = $_SERVER['SERVER_PORT'];
}
$sitedataroot = "/mnt/ramdisk/sitedata";
$CFG->dbtype = 'pgsql';
#$CFG->dbtype = 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'db-'.$phpport;
$CFG->dbuser = 'ubuntu';
$CFG->dbpass = 'someshi!zzz';
$CFG->prefix = 'mdl_';
$CFG->dboptions = array (
'dbpersist' => 0,
'dbsocket' => 1,
);
$CFG->wwwroot = 'http://127.0.0.1';
$CFG->dataroot = $sitedataroot.'/site'; # just a real fake, cos it's needed :D
$CFG->admin = 'admin';
$CFG->directorypermissions = 0777;
$CFG->passwordsaltmain = '';
$CFG->noemailever = true; // turn off all emails
#behat setup
$CFG->behat_prefix = 'behat_';
$CFG->behat_dataroot = $sitedataroot.'/behat-'.$phpport;
$CFG->behat_wwwroot = 'http://localhost:'.$phpport;
$CFG->behat_config = array(
'default' => array(
/*'filters' => array(
'tags' => '~@_switch_window'
),*/
'extensions' => array(
'Behat\MinkExtension\Extension' => array(
'selenium2' => array(
#'browser' => 'chrome',
'capabilities' => array( #we need this capability thang in order to use selenium hub
'version' => ''
)
)
)
)
),
);
#phpunit setup
$CFG->phpunit_prefix = 'phpu_';
$CFG->phpunit_dataroot = $sitedataroot.'/phpunit-'.$phpport;
unset($phpport, $sitedataroot);
require_once(dirname(__FILE__) . '/lib/setup.php');
// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems!