lithium\tests\cases\template\helper\FormTest::testFormErrorWithRecordAndSpecificKeyAndValue PHP Method

testFormErrorWithRecordAndSpecificKeyAndValue() public method

    public function testFormErrorWithRecordAndSpecificKeyAndValue()
    {
        $record = new Record(array('model' => $this->_model));
        $record->name = 'Nils';
        $record->errors(array('name' => array('Please enter a name')));
        $this->form->create($record);
        $result = $this->form->error('name');
        $this->assertTags($result, array('div' => array('class' => 'error'), 'Please enter a name', '/div'));
    }
FormTest