From 0793d2a3d520301af29aca5c8d9b38fd5883122c Mon Sep 17 00:00:00 2001
From: mattab <matthieu.aubry@gmail.com>
Date: Wed, 3 Apr 2013 11:09:51 +1300
Subject: [PATCH] Clarifying the message in PHPUnit since I can't make it work
 in Phpstorm without this hack anymore (I specified the phpunit.xml in the
 settings but it does not init the HTTP_HOST and REQUEST_URI variables.

---
 tests/PHPUnit/bootstrap.php | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/PHPUnit/bootstrap.php b/tests/PHPUnit/bootstrap.php
index 882f3ae579..fe0d757b4d 100644
--- a/tests/PHPUnit/bootstrap.php
+++ b/tests/PHPUnit/bootstrap.php
@@ -1,4 +1,9 @@
 <?php
+// Note to devs: In Phpstorm I had to manually set these here as PHPUnit is not init properly.
+// Uncomment and set manually the path to Piwik if you get the WARNING message in your IDE.
+//$_SERVER['REQUEST_URI'] = '/piwik-master/index.php';
+//$_SERVER['HTTP_HOST'] = 'localhost';
+
 if (!defined("PIWIK_PATH_TEST_TO_ROOT")) {
     define('PIWIK_PATH_TEST_TO_ROOT', realpath(dirname(__FILE__) . '/../..'));
 }
@@ -53,7 +58,8 @@ function checkPiwikSetupForTests()
 3) Copy phpunit.xml.dist to phpunit.xml
 4) Edit in phpunit.xml the @REQUEST_URI@ and replace with the webserver path to Piwik, eg. '/dev/piwik/'
 
-Try again and now the tests should run!";
+Try again.
+-> If you still get this message, you can work around it by specifying Host + Request_Uri at the top of this file tests/PHPUnit/bootstrap.php. <-";
         exit(1);
     }
 
-- 
GitLab