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

testErrorsIsClearedOnEachValidates() public method

    public function testErrorsIsClearedOnEachValidates()
    {
        $post = MockPostForValidates::create(array('title' => 'new post'));
        $result = $post->validates();
        $this->assertFalse($result);
        $result = $post->errors();
        $this->assertNotEmpty($result);
        $post->email = '[email protected]';
        $result = $post->validates();
        $this->assertTrue($result);
        $result = $post->errors();
        $this->assertEmpty($result);
    }
ModelTest