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

testValidatesCustomEventFalse() public method

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