Fix unit test in case no vendor/autoload.php take 2, a=chris

Chris Pollett [2015-09-09 22:Sep:th]
Fix unit test in case no vendor/autoload.php take 2, a=chris
Filename
src/configs/Config.php
diff --git a/src/configs/Config.php b/src/configs/Config.php
index bb7a4871d..70a970e3b 100755
--- a/src/configs/Config.php
+++ b/src/configs/Config.php
@@ -133,8 +133,10 @@ ini_set('pcre.backtrack_limit', 1000000);
     /** Calculate base directory of script
      * @ignore
      */
-nsdefine("BASE_DIR", str_replace("\\", "/", realpath(__DIR__ ."/../")));
-nsdefine("PARENT_DIR",  substr(BASE_DIR, 0, -strlen("/src")));
+if (!nsdefined("BASE_DIR")) {
+    nsdefine("BASE_DIR", str_replace("\\", "/", realpath(__DIR__ ."/../")));
+    nsdefine("PARENT_DIR",  substr(BASE_DIR, 0, -strlen("/src")));
+}
 computeBaseUrl();
 /** Yioop Namespace*/
 nsdefine('NS', "seekquarry\\yioop\\");
ViewGit