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

testValidatesCustomEventsFalse() public method

    public function testValidatesCustomEventsFalse()
    {
        $post = MockPostForValidates::create();
        $events = array('customEvent', 'anotherCustomEvent');
        $result = $post->validates(compact('events'));
        $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', 'email is not in 1st list', 'email is not in 2nd list'));
        $result = $post->errors();
        $this->assertEqual($expected, $result);
    }
ModelTest