From 6c753c5d8358009e07146d4bc77e49ef082f6dce Mon Sep 17 00:00:00 2001
From: mattab <matthieu.aubry@gmail.com>
Date: Fri, 22 Nov 2013 20:23:19 +1300
Subject: [PATCH] Adding new screenshot test case: Themes admin page

---
 core/Theme.php                        | 2 +-
 tests/PHPUnit/IntegrationTestCase.php | 4 +++-
 tests/PHPUnit/UITest.php              | 7 ++++++-
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/core/Theme.php b/core/Theme.php
index 76fdd57303..3ae44431de 100644
--- a/core/Theme.php
+++ b/core/Theme.php
@@ -59,7 +59,7 @@ class Theme
             '~(src|href)=[\'"]([^\'"]+)[\'"]~',
 
             // rewrite images in CSS files, i.e. url(plugins/Morpheus/overrides/themes/default/images/help.png);
-            '~(url\()[\'"]([^\)]?[themes|plugins]+[^\)]+[.jpg|png|gif|svg]?)[\'"][\)]~',
+            '~(url\()[\'"]([^\)]?[plugins]+[^\)]+[.jpg|png|gif|svg]?)[\'"][\)]~',
 
             // rewrites images in JS files
             '~(=)[\s]?[\'"]([^\'"]+[.jpg|.png|.gif|svg]?)[\'"]~',
diff --git a/tests/PHPUnit/IntegrationTestCase.php b/tests/PHPUnit/IntegrationTestCase.php
index 09bb84192f..d54db6e778 100755
--- a/tests/PHPUnit/IntegrationTestCase.php
+++ b/tests/PHPUnit/IntegrationTestCase.php
@@ -187,7 +187,9 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase
         Piwik::setUserIsSuperUser();
 
         Cache::deleteTrackerCache();
-        if ($installPlugins === null) $installPlugins = $createEmptyDatabase;
+        if ($installPlugins === null) {
+            $installPlugins = $createEmptyDatabase;
+        }
         static::installAndLoadPlugins( $installPlugins);
 
 
diff --git a/tests/PHPUnit/UITest.php b/tests/PHPUnit/UITest.php
index ad2206b7bb..26988c5a43 100644
--- a/tests/PHPUnit/UITest.php
+++ b/tests/PHPUnit/UITest.php
@@ -113,7 +113,7 @@ abstract class UITest extends IntegrationTestCase
         
         parent::tearDownAfterClass();
     }
-    
+
     public function setUp()
     {
         parent::setUp();
@@ -262,6 +262,11 @@ Screenshot diff: $diffPath\n";
             }
         }
 
+        self::createProxySymlinks();
+    }
+
+    private static function createProxySymlinks()
+    {
         foreach (self::$recursiveProxyLinkNames as $linkName) {
             $linkPath = PIWIK_INCLUDE_PATH . '/tests/PHPUnit/proxy/' . $linkName;
             if (!file_exists($linkPath)) {
-- 
GitLab