From 008bae4fca2d7e82a1f16f80977a43896e985c3e Mon Sep 17 00:00:00 2001
From: mattab <matthieu.aubry@gmail.com>
Date: Mon, 20 Jan 2014 16:24:21 +1300
Subject: [PATCH] Make UI tests use Morpheus theme by default, create Zeitgeist
 screenshots in he PHPUnit/UI/processed-ui-screenshots/Zeitgeist/ directory

---
 tests/PHPUnit/UITest.php      | 10 +++++-----
 tests/PHPUnit/proxy/index.php | 14 +++++++-------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/tests/PHPUnit/UITest.php b/tests/PHPUnit/UITest.php
index e5e91b215d..bc194dcae7 100644
--- a/tests/PHPUnit/UITest.php
+++ b/tests/PHPUnit/UITest.php
@@ -82,14 +82,14 @@ abstract class UITest extends IntegrationTestCase
                 list($processedScreenshotPath, $expectedScreenshotPath) = self::getProcessedAndExpectedScreenshotPaths($name);
                 $urls[] = array($processedScreenshotPath, $testUrl, $jsToTest);
 
-                // Screenshot Morpheus
-                list($processedScreenshotPath, $expectedScreenshotPath) = self::getProcessedAndExpectedScreenshotPaths($name, "Morpheus/");
-                $enableMorpheus = "&morpheus=1";
+                // Screenshot Zeitgeist
+                list($processedScreenshotPath, $expectedScreenshotPath) = self::getProcessedAndExpectedScreenshotPaths($name, "Zeitgeist/");
+                $enableZeitgeist = "&zeitgeist=1";
                 // Add the parameter to the query string, not the hash
                 if(($hash = strpos($testUrl, '#')) !== false) {
-                    $testUrl = substr($testUrl, 0, $hash) . $enableMorpheus . substr($testUrl, $hash);
+                    $testUrl = substr($testUrl, 0, $hash) . $enableZeitgeist . substr($testUrl, $hash);
                 } else {
-                    $testUrl .= $enableMorpheus;
+                    $testUrl .= $enableZeitgeist;
                 }
 
                 $urls[] = array($processedScreenshotPath, $testUrl, $jsToTest);
diff --git a/tests/PHPUnit/proxy/index.php b/tests/PHPUnit/proxy/index.php
index 46941f0ddc..006516991c 100644
--- a/tests/PHPUnit/proxy/index.php
+++ b/tests/PHPUnit/proxy/index.php
@@ -31,17 +31,17 @@ function loadAllPluginsButOneTheme()
 
     $themesNotToEnable = array('ExampleTheme', 'LeftMenu', 'PleineLune');
 
-    $enableMorpheus = !empty($_REQUEST['morpheus']);
-    if (!$enableMorpheus) {
-        $themesNotToEnable[] = 'Morpheus';
+    $enableZeitgeist = !empty($_REQUEST['zeitgeist']);
+    if (!$enableZeitgeist) {
+        $themesNotToEnable[] = 'Zeitgeist';
     }
 
     $pluginsToEnable = array_diff($pluginsToEnable, $themesNotToEnable);
     \Piwik\Config::getInstance()->Plugins['Plugins'] = $pluginsToEnable;
-    return $enableMorpheus;
+    return $enableZeitgeist;
 }
 
-$enableMorpheus = loadAllPluginsButOneTheme();
+$enableZeitgeist = loadAllPluginsButOneTheme();
 
 $controller = \Piwik\FrontController::getInstance();
 $controller->init();
@@ -49,9 +49,9 @@ $controller->init();
 
 $response = $controller->dispatch();
 
-if($enableMorpheus) {
+if($enableZeitgeist) {
     $replace = "action=getCss";
-    $response = str_replace($replace, $replace . "&morpheus=1", $response);
+    $response = str_replace($replace, $replace . "&zeitgeist=1", $response);
 }
 
 if (!is_null($response)) {
-- 
GitLab