From 798fcf1b79a427881401a0da63f4e52ad559b64e Mon Sep 17 00:00:00 2001
From: diosmosis <benaka@piwik.pro>
Date: Thu, 29 Oct 2015 13:35:37 -0700
Subject: [PATCH] Rename whitelist to blacklist since we're ignoring entries
 that are in the list, not running code only for those entries.

---
 config/environment/ui-test.php     | 14 +++++++-------
 plugins/Overlay/config/ui-test.php |  4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/config/environment/ui-test.php b/config/environment/ui-test.php
index e7d82534bb..de2d549f06 100644
--- a/config/environment/ui-test.php
+++ b/config/environment/ui-test.php
@@ -6,9 +6,9 @@ return array(
 
     // UI tests will remove the port from all URLs to the test server. if a test
     // requires the ports in UI tests (eg, Overlay), add the api/controller methods
-    // to one of these whitelists
-    'tests.ui.url_normalizer_whitelist.api' => array(),
-    'tests.ui.url_normalizer_whitelist.controller' => array(),
+    // to one of these blacklists
+    'tests.ui.url_normalizer_blacklist.api' => array(),
+    'tests.ui.url_normalizer_blacklist.controller' => array(),
 
     'Piwik\Config' => \DI\decorate(function (\Piwik\Config $config) {
         $config->General['cors_domains'][] = '*';
@@ -24,19 +24,19 @@ return array(
         array('Request.dispatch.end', function (&$result) {
             $request = $_GET + $_POST;
 
-            $apiWhitelist = StaticContainer::get('tests.ui.url_normalizer_whitelist.api');
+            $apiblacklist = StaticContainer::get('tests.ui.url_normalizer_blacklist.api');
             if (!empty($request['method'])
-                && in_array($request['method'], $apiWhitelist)
+                && in_array($request['method'], $apiblacklist)
             ) {
                 return;
             }
 
-            $controllerActionWhitelist = StaticContainer::get('tests.ui.url_normalizer_whitelist.controller');
+            $controllerActionblacklist = StaticContainer::get('tests.ui.url_normalizer_blacklist.controller');
             if (!empty($request['module'])
                 && !empty($request['action'])
             ) {
                 $controllerAction = $request['module'] . '.' . $request['action'];
-                if (in_array($controllerAction, $controllerActionWhitelist)) {
+                if (in_array($controllerAction, $controllerActionblacklist)) {
                     return;
                 }
             }
diff --git a/plugins/Overlay/config/ui-test.php b/plugins/Overlay/config/ui-test.php
index 28bce9a036..1bb5ae8b75 100644
--- a/plugins/Overlay/config/ui-test.php
+++ b/plugins/Overlay/config/ui-test.php
@@ -4,10 +4,10 @@ return array(
 
     // Overlay needs the full URLs in order to find the links in the embedded page (otherwise the %
     // tooltips don't show up)
-    'tests.ui.url_normalizer_whitelist.api' => DI\add(array(
+    'tests.ui.url_normalizer_blacklist.api' => DI\add(array(
         'Overlay.getFollowingPages',
     )),
-    'tests.ui.url_normalizer_whitelist.controller' => DI\add(array(
+    'tests.ui.url_normalizer_blacklist.controller' => DI\add(array(
         'Overlay.renderSidebar',
     )),
 
-- 
GitLab