From dd642bc8af1372d7dfeab7728c0e0f6b926f29e4 Mon Sep 17 00:00:00 2001
From: diosmosis <benaka@piwik.pro>
Date: Wed, 29 Oct 2014 20:35:57 -0700
Subject: [PATCH] Make sure setup-fixture command does not overwrite config on
 normal UI tests run.

---
 plugins/TestRunner/Commands/TestsSetupFixture.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/plugins/TestRunner/Commands/TestsSetupFixture.php b/plugins/TestRunner/Commands/TestsSetupFixture.php
index 7e95fc1d37..8c053b1711 100644
--- a/plugins/TestRunner/Commands/TestsSetupFixture.php
+++ b/plugins/TestRunner/Commands/TestsSetupFixture.php
@@ -111,7 +111,7 @@ class TestsSetupFixture extends ConsoleCommand
             }
         }
 
-        $fixture = $this->createFixture($input);
+        $fixture = $this->createFixture($input, $allowSave = !empty($configDomainToSave));
 
         $this->setupDatabaseOverrides($input, $fixture);
 
@@ -188,7 +188,7 @@ class TestsSetupFixture extends ConsoleCommand
         }
     }
 
-    private function createFixture(InputInterface $input)
+    private function createFixture(InputInterface $input, $allowSave)
     {
         $fixtureClass = $input->getArgument('fixture');
         if (class_exists("Piwik\\Tests\\Fixtures\\" . $fixtureClass)) {
@@ -221,7 +221,7 @@ class TestsSetupFixture extends ConsoleCommand
         }
 
         if ($fixture->createConfig) {
-            Config::getInstance()->setTestEnvironment($pathLocal = null, $pathGlobal = null, $pathCommon = null, $allowSaving = true);
+            Config::getInstance()->setTestEnvironment($pathLocal = null, $pathGlobal = null, $pathCommon = null, $allowSave);
         }
 
         $fixture->createConfig = false;
-- 
GitLab