diff --git a/tests/SettingsTest.php b/tests/SettingsTest.php index 967f73d..dd78e34 100644 --- a/tests/SettingsTest.php +++ b/tests/SettingsTest.php @@ -139,6 +139,33 @@ class SettingsTest extends TestCase $this->assertEquals('testing', $cfg->testFiles); $this->assertEquals(42, $cfg->answer); + + return $cfg; + } + + /** + * @depends testTestingOverride + */ + public function testTestingNumArrayOverride(Settings $cfg) + { + $data = [ + 0 => 'Index0_test', + 1 => 'Index1_default', + 2 => 'Index2_test', + 3 => 'Index3_local', + 4 => 'Index4_local', + 5 => 'Index5_local', + 6 => 'Index6_default', + 7 => 'Index7_default', + 10 => 'Index10_test' + ]; + + $numArray = $cfg->numArray; + + foreach ($numArray as $key => $value) + { + $this->assertEquals($data[$key], $value); + } } /** diff --git a/tests/cfg/testing/config/conf.php b/tests/cfg/testing/config/conf.php index ded4c06..f3a8261 100644 --- a/tests/cfg/testing/config/conf.php +++ b/tests/cfg/testing/config/conf.php @@ -1,3 +1,9 @@ 'test' + 'mode' => 'test', + 'numArray' => + [ + 3 => 'Index3_local', + 4 => 'Index4_local', + 5 => 'Index5_local', + ] ]; diff --git a/tests/cfg/testing/config/default.conf.php b/tests/cfg/testing/config/default.conf.php index 5497456..80a57f7 100644 --- a/tests/cfg/testing/config/default.conf.php +++ b/tests/cfg/testing/config/default.conf.php @@ -1,5 +1,16 @@ 'prod', 'testFiles' => 'testing', - 'answer' => false + 'answer' => false, + 'numArray' => + [ + 0 => 'Index0_default', + 1 => 'Index1_default', + 2 => 'Index2_default', + 3 => 'Index3_default', + 4 => 'Index4_default', + 5 => 'Index5_default', + 6 => 'Index6_default', + 7 => 'Index7_default', + ] ]; diff --git a/tests/cfg/testing/config/testing.conf.php b/tests/cfg/testing/config/testing.conf.php index 20f0c6a..b0b14c2 100644 --- a/tests/cfg/testing/config/testing.conf.php +++ b/tests/cfg/testing/config/testing.conf.php @@ -1,3 +1,10 @@ 42 + 'answer' => 42, + 'numArray' => + [ + 0 => 'Index0_test', + 2 => 'Index2_test', + 5 => 'Index5_test', + 10 => 'Index10_test', + ] ];