From 123deeecd26bb581d129d99ee66478c3e5e61406 Mon Sep 17 00:00:00 2001
From: mattab <matthieu.aubry@gmail.com>
Date: Tue, 15 Oct 2013 13:48:32 +1300
Subject: [PATCH] ./console tests:run will now run all test groups one after
 another

---
 plugins/CoreConsole/RunTests.php | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/plugins/CoreConsole/RunTests.php b/plugins/CoreConsole/RunTests.php
index 7250993e8d..9c2f114f74 100644
--- a/plugins/CoreConsole/RunTests.php
+++ b/plugins/CoreConsole/RunTests.php
@@ -22,11 +22,6 @@ use Symfony\Component\Console\Output\OutputInterface;
  */
 class RunTests extends Command
 {
-    protected function getTestsGroups()
-    {
-        return array('Core', 'Plugins', 'Integration');
-    }
-
     protected function configure()
     {
         $this->setName('tests:run');
@@ -39,22 +34,26 @@ class RunTests extends Command
     {
         $options = $input->getOption('options');
         $groups = $input->getArgument('group');
+
         $groups = explode(",", $groups);
         $groups = array_map('ucfirst', $groups);
         $groups = array_filter('strlen', $groups);
+
         if(empty($groups)) {
             $groups = $this->getTestsGroups();
-
-            if(\UITest::isPhantomJsAvailable()) {
-                $groups[] = 'UI';
-            }
         }
         foreach($groups as $group) {
             $params = '--group ' . $group . ' ' . $options;
             $cmd = sprintf('cd %s/tests/PHPUnit && phpunit %s', PIWIK_DOCUMENT_ROOT, $params);
-            $output->writeln('Executing command: ' . $cmd);
+            $output->writeln('Executing command: <info>' . $cmd . '</info>');
             passthru($cmd);
             $output->writeln();
         }
     }
+
+    private function getTestsGroups()
+    {
+        return array('Core', 'Plugins', 'Integration', 'UI');
+    }
+
 }
\ No newline at end of file
-- 
GitLab