lithium\tests\cases\data\ModelTest::testValidatesFalse PHP Method

testValidatesFalse() public method

public testValidatesFalse ( )
    public function testValidatesFalse()
    {
        $post = MockPostForValidates::create();
        $result = $post->validates();
        $this->assertFalse($result);
        $result = $post->errors();
        $this->assertNotEmpty($result);
        $expected = array('title' => array('please enter a title'), 'email' => array('email is empty', 'email is not valid'));
        $result = $post->errors();
        $this->assertEqual($expected, $result);
    }
ModelTest