public function testNestedFieldAccess()
{
$doc = new Document(array('data' => array('foo' => array('bar' => 'value'))));
$this->form->create($doc);
$result = $this->form->text('foo.bar');
$this->assertTags($result, array('input' => array('type' => 'text', 'name' => 'foo[bar]', 'id' => 'FooBar', 'value' => 'value')));
$result = $this->form->field('foo.bar');
$this->assertTags($result, array('div' => array(), 'label' => array('for' => 'FooBar'), 'Foo Bar', '/label', 'input' => array('type' => 'text', 'name' => 'foo[bar]', 'id' => 'FooBar', 'value' => 'value')));
}