diff --git a/config/environment/ui-test.php b/config/environment/ui-test.php
index de2d549f06585ff212e3d94af01f4218bc7bfe12..b5ef0fede4f267d9ead645eb1d152582ebd0b49b 100644
--- a/config/environment/ui-test.php
+++ b/config/environment/ui-test.php
@@ -12,8 +12,8 @@ return array(
 
     'Piwik\Config' => \DI\decorate(function (\Piwik\Config $config) {
         $config->General['cors_domains'][] = '*';
-        $config->trusted_hosts[] = $config->tests['http_host'];
-        $config->trusted_hosts[] = $config->tests['http_host'] . ':' . $config->tests['port'];
+        $config->General['trusted_hosts'][] = $config->tests['http_host'];
+        $config->General['trusted_hosts'][] = $config->tests['http_host'] . ':' . $config->tests['port'];
         return $config;
     }),