public function testFormFieldWithError()
{
$record = new Record(array('model' => $this->_model));
$record->errors(array('name' => array('Please enter a name')));
$this->form->create($record);
$result = $this->form->field('name');
$this->assertTags($result, array('<div', 'label' => array('for' => 'MockFormPostName'), 'Name', '/label', 'input' => array('type' => "text", 'name' => 'name', 'id' => 'MockFormPostName'), 'div' => array('class' => "error"), 'Please enter a name', '/div', '/div'));
}