diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2014-10-10 00:55:11 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2014-10-10 00:55:11 +0400 |
commit | 5b79f746876e24e1171c5cbfc25c5cfb21e87e36 (patch) | |
tree | b33ff9be7fa684a165711f4f102bc88aec26f016 /plugins | |
parent | d73cc850817c5c51bd8359ecb6a8f3b7a49ebd1c (diff) | |
parent | 9c32a948e1fd70c1db09147f634cde4a6bd4e5c4 (diff) |
Merge branch 'master' into 5940_testRenamingAndCorrectFolders
Conflicts:
plugins/CoreConsole/Commands/TestsRun.php
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/CoreConsole/Commands/TestsRun.php | 18 | ||||
-rw-r--r-- | plugins/UserSettings/tests/Fixtures/LanguageFixture.php | 1 |
2 files changed, 16 insertions, 3 deletions
diff --git a/plugins/CoreConsole/Commands/TestsRun.php b/plugins/CoreConsole/Commands/TestsRun.php index 4178337057..de32f0b534 100644 --- a/plugins/CoreConsole/Commands/TestsRun.php +++ b/plugins/CoreConsole/Commands/TestsRun.php @@ -90,7 +90,7 @@ class TestsRun extends ConsoleCommand private function executeTestFile($testFile, $options, $command, OutputInterface $output) { $params = $options . " " . $testFile; - $cmd = sprintf("cd %s/tests/PHPUnit && %s %s", PIWIK_DOCUMENT_ROOT, $command, $params); + $cmd = $this->getCommand($command, $params); $output->writeln('Executing command: <info>' . $cmd . '</info>'); passthru($cmd); $output->writeln(""); @@ -104,11 +104,12 @@ class TestsRun extends ConsoleCommand foreach ($groups as $group) { $params = '--group ' . $group . ' ' . str_replace('%group%', $group, $options); + if (!empty($suite)) { $params .= ' --testsuite ' . $suite; } - - $cmd = sprintf('cd %s/tests/PHPUnit && %s %s', PIWIK_DOCUMENT_ROOT, $command, $params); + + $cmd = $this->getCommand($command, $params); $output->writeln('Executing command: <info>' . $cmd . '</info>'); passthru($cmd); $output->writeln(""); @@ -119,4 +120,15 @@ class TestsRun extends ConsoleCommand { return array('Core', 'Plugins', 'UI'); } + + /** + * @param $command + * @param $params + * @return string + */ + private function getCommand($command, $params) + { + $cmd = sprintf('cd %s/tests/PHPUnit && %s %s', PIWIK_DOCUMENT_ROOT, $command, $params); + return $cmd; + } }
\ No newline at end of file diff --git a/plugins/UserSettings/tests/Fixtures/LanguageFixture.php b/plugins/UserSettings/tests/Fixtures/LanguageFixture.php index dc6b4fcb0b..6cbd9d8343 100644 --- a/plugins/UserSettings/tests/Fixtures/LanguageFixture.php +++ b/plugins/UserSettings/tests/Fixtures/LanguageFixture.php @@ -54,6 +54,7 @@ class LanguageFixture extends Fixture $this->dateTime, $defaultInit = false ); + $tracker->setTokenAuth(self::getTokenAuth()); $hour = 1; foreach ($this->getBrowserLangs() as $browserLang) { |