JBZoo\PHPUnit\ArrayTest::testGet PHP Метод

testGet() публичный Метод

public testGet ( )
    public function testGet()
    {
        $array = array();
        $array['abc'] = 'def';
        $array['nested'] = array('key1' => 'val1', 'key2' => 'val2', 'key3' => 'val3');
        // Looks for $array['abc']
        is('def', Vars::get($array['abc']));
        // Looks for $array['nested']['key2']
        is('val2', Vars::get($array['nested']['key2']));
        // Looks for $array['doesnotexist']
        is('defaultval', Vars::get($array['doesnotexist'], 'defaultval'));
    }