Adds multisite test environment to CI

Adds Robo command to run multisite tests locally and on CI
This commit is contained in:
Vlad
2017-11-13 17:04:55 -05:00
parent ec3bb5b95c
commit b50b636371
7 changed files with 120 additions and 19 deletions

View File

@@ -153,17 +153,30 @@ class RoboFile extends \Robo\Tasks {
return $this->_exec('./tasks/transifex_init.sh');
}
function testUnit($opts=['file' => null, 'xml' => false]) {
function testUnit($opts=['file' => null, 'xml' => false, 'multisite' => false]) {
$this->loadEnv();
$command = 'vendor/bin/codecept run unit -c codeception.unit.yml -f '.(($opts['file']) ? $opts['file'] : '');
$command = 'vendor/bin/codecept run unit -c codeception.unit.yml';
if($opts['multisite']) {
$command = 'MULTISITE=true ' . $command;
}
if($opts['file']) {
$command .= ' -f ' . $opts['file'];
}
if($opts['xml']) {
$command .= ' --xml';
}
return $this->_exec($command);
}
function testMultisiteUnit($opts=['file' => null, 'xml' => false, 'multisite' => true]) {
return $this->testUnit($opts);
}
function testCoverage($opts=['file' => null, 'xml' => false]) {
$this->loadEnv();
$command = join(' ', array(