lithium\tests\cases\data\ModelTest::testValidatesTitle PHP Метод

testValidatesTitle() публичный Метод

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