UtilsTest::testGetDotNotation PHP Method

testGetDotNotation() public method

public testGetDotNotation ( )
    public function testGetDotNotation()
    {
        $array = ['test' => ['test2' => 'test2Value', 'test3' => ['test4' => 'test4Value']]];
        $this->assertEquals('test2Value', Utils::getDotNotation($array, 'test.test2'));
        $this->assertEquals('test4Value', Utils::getDotNotation($array, 'test.test3.test4'));
        $this->assertEquals('defaultValue', Utils::getDotNotation($array, 'test.non_existent', 'defaultValue'));
    }