Piwik\Plugins\Diagnostics\Test\Integration\Commands\ConfigReaderTest::test_getConfigValuesFromFiles PHP Method

test_getConfigValuesFromFiles() public method

    public function test_getConfigValuesFromFiles()
    {
        $fileConfig = $this->configReader->getConfigValuesFromFiles();
        $expected = array('Category' => array('key1' => array('value' => 'value_overwritten', 'description' => '', 'isCustomValue' => true, 'defaultValue' => 'value1'), 'key2' => array('value' => 'valueCommon', 'description' => '', 'isCustomValue' => false, 'defaultValue' => 'value2'), 'key3' => array('value' => '${@piwik(crash))}', 'description' => '', 'isCustomValue' => false, 'defaultValue' => NULL)), 'CategoryOnlyInGlobalFile' => array('key3' => array('value' => 'value3', 'description' => 'test comment', 'isCustomValue' => false, 'defaultValue' => 'value3'), 'key4' => array('value' => 'value4', 'description' => 'test comment 4', 'isCustomValue' => false, 'defaultValue' => 'value4')), 'TestArray' => array('installed' => array('value' => array(0 => 'plugin"1', 1 => 'plugin2', 2 => 'plugin3'), 'description' => 'test comment 2
with multiple lines', 'isCustomValue' => true, 'defaultValue' => array(0 => 'plugin1', 1 => 'plugin4'))), 'TestArrayOnlyInGlobalFile' => array('my_array' => array('value' => array(0 => 'value1', 1 => 'value2'), 'description' => '', 'isCustomValue' => false, 'defaultValue' => array(0 => 'value1', 1 => 'value2'))), 'GeneralSection' => array('password' => array('value' => '******', 'description' => '', 'isCustomValue' => true, 'defaultValue' => NULL), 'login' => array('value' => 'tes"t', 'description' => '', 'isCustomValue' => true, 'defaultValue' => NULL)), 'TestOnlyInCommon' => array('value' => array('value' => 'commonValue', 'description' => '', 'isCustomValue' => false, 'defaultValue' => NULL)), 'Tracker' => array('commonConfigTracker' => array('value' => 'commonConfigTrackerValue', 'description' => '', 'isCustomValue' => false, 'defaultValue' => NULL)));
        $this->assertEquals($expected, $fileConfig);
    }