From c923086d8ae13a0773f1c2098bbfa0a781f75dde Mon Sep 17 00:00:00 2001 From: diosmosis <benaka@piwik.pro> Date: Sun, 15 Mar 2015 10:28:48 -0700 Subject: [PATCH] Fix unit test, make array settings being overwritten in default settings file chain the expected behavior. --- core/Config/IniFileChain.php | 7 ++++--- tests/PHPUnit/Unit/Config/IniFileChainTest.php | 2 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/core/Config/IniFileChain.php b/core/Config/IniFileChain.php index 571863770f..9eaae3e9ff 100644 --- a/core/Config/IniFileChain.php +++ b/core/Config/IniFileChain.php @@ -20,9 +20,10 @@ use Piwik\Piwik; * user settings file. * * The default setting files (for example, global.ini.php & common.ini.php) hold the default setting values. - * The settings in these files are merged recursively, so array settings in one file will add elements to - * the same settings in the previous file. Default settings files cannot be modified through the IniFileChain - * class. + * The settings in these files are merged recursively, however, array settings in one file will still + * overwrite settings in the previous file. + * + * Default settings files cannot be modified through the IniFileChain class. * * The user settings file (for example, config.ini.php) holds the actual setting values. Settings in the * user settings files overwrite other settings. So array settings will not merge w/ previous values. diff --git a/tests/PHPUnit/Unit/Config/IniFileChainTest.php b/tests/PHPUnit/Unit/Config/IniFileChainTest.php index 7c83f499c1..0d8d359cd0 100644 --- a/tests/PHPUnit/Unit/Config/IniFileChainTest.php +++ b/tests/PHPUnit/Unit/Config/IniFileChainTest.php @@ -136,8 +136,6 @@ class IniFileChainTest extends PHPUnit_Framework_TestCase 'Section1' => array( 'var1' => 'overriddenValue1', 'var3' => array( - 'value3', - 'value4', 'overriddenValue2', 'overriddenValue3' ) -- GitLab