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

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

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