Esempio n. 1
0
    public function testTraverseArrayFlattensToDotSeparatedKeyValuePairs()
    {
        $config = array(
            'foo' => 'bar',
            'bar' => array(
                'baz' => 'bat',
                'bat' => 'bogus',
            ),
            'baz' => 'not what you think',
        );
        $expected = array(
            'foo'     => 'bar',
            'bar.baz' => 'bat',
            'bar.bat' => 'bogus',
            'baz'     => 'not what you think',
        );

        $this->assertEquals($expected, $this->configResource->traverseArray($config));
    }