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

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

    public function testValidatesCustomEventValid()
    {
        $post = MockPostForValidates::create(array('title' => 'new post', 'email' => '[email protected]'));
        $events = 'customEvent';
        $result = $post->validates(compact('events'));
        $this->assertTrue($result);
        $result = $post->errors();
        $this->assertEmpty($result);
    }
ModelTest