From 15321e928b34c9fd6fdf392255412928a1f317c4 Mon Sep 17 00:00:00 2001
From: mattab <matthieu.aubry@gmail.com>
Date: Wed, 14 Jan 2015 17:28:26 +1300
Subject: [PATCH] When database is not created yet, prevent fails from testing
 locally

---
 tests/PHPUnit/bootstrap.php | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/PHPUnit/bootstrap.php b/tests/PHPUnit/bootstrap.php
index e067ef11c3..b37816e231 100644
--- a/tests/PHPUnit/bootstrap.php
+++ b/tests/PHPUnit/bootstrap.php
@@ -113,8 +113,12 @@ Try again.";
     $url = Fixture::getRootUrl() . 'tests/PHPUnit/proxy/index.php?module=TestRunner&action=check';
     $response = Http::sendHttpRequestBy('curl', $url, 2);
 
-    // The SQL error is for Travis...
-    if ($response === 'OK' || strpos($response, 'Table &#039;piwik_tests.option&#039; doesn&#039;t exist') !== false) {
+    if ($response === 'OK'
+        // The SQL error is for Travis...
+        || strpos($response, 'Table &#039;piwik_tests.option&#039; doesn&#039;t exist') !== false
+        || strpos($response, 'Table &#039;piwik_tests.piwiktests_option&#039; doesn&#039;t exist') !== false
+    ) {
+
         return;
     }
 
-- 
GitLab