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

testValidateWithRequiredTrue() public method

    public function testValidateWithRequiredTrue()
    {
        $post = MockPost::create(array('title' => 'post title'));
        $post->sync(1);
        $post->validates(array('rules' => array('title' => 'A custom message here for empty titles.', 'email' => array(array('notEmpty', 'message' => 'email is empty.', 'required' => true)))));
        $this->assertNotEmpty($post->errors());
    }
ModelTest