From 86d06def6c5592f2081cc1ce487ef15ac6d40610 Mon Sep 17 00:00:00 2001
From: diosmosis <benakamoorthi@fastmail.fm>
Date: Sun, 13 Jul 2014 19:18:44 -0700
Subject: [PATCH] Updating UI test module and add auxilliary catch statement to
 proxy piwik.php.

---
 tests/PHPUnit/UI              |  2 +-
 tests/PHPUnit/proxy/piwik.php | 21 +++++++++++++--------
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI
index cb369e4347..68f577b4ad 160000
--- a/tests/PHPUnit/UI
+++ b/tests/PHPUnit/UI
@@ -1 +1 @@
-Subproject commit cb369e4347ba46e57841104cd81d9bc4cedfdc66
+Subproject commit 68f577b4ad31b18208c6b78c179eab3148288a22
diff --git a/tests/PHPUnit/proxy/piwik.php b/tests/PHPUnit/proxy/piwik.php
index 4f01b198da..50c4eb8c69 100755
--- a/tests/PHPUnit/proxy/piwik.php
+++ b/tests/PHPUnit/proxy/piwik.php
@@ -20,15 +20,20 @@ require realpath(dirname(__FILE__)) . "/includes.php";
 // calling us waits for the full request to process before unblocking
 ob_start();
 
-Piwik_TestingEnvironment::addHooks();
+try {
+    Piwik_TestingEnvironment::addHooks();
 
-GeoIp::$geoIPDatabaseDir = 'tests/lib/geoip-files';
+    GeoIp::$geoIPDatabaseDir = 'tests/lib/geoip-files';
 
-Tracker::setTestEnvironment();
-Manager::getInstance()->deleteAll();
-Option::clearCache();
-Site::clearCache();
-Cache::deleteTrackerCache();
+    Tracker::setTestEnvironment();
+    Manager::getInstance()->deleteAll();
+    Option::clearCache();
+    Site::clearCache();
+    Cache::deleteTrackerCache();
+
+    include PIWIK_INCLUDE_PATH . '/piwik.php';
+} catch (Exception $ex) {
+    echo "Unexpected error during tracking: " . $ex->getTraceAsString() . "\n";
+}
 
-include PIWIK_INCLUDE_PATH . '/piwik.php';
 ob_end_flush();
-- 
GitLab