Sokil\Mongo\DocumentValidationTest::testAddErrors PHP Method

testAddErrors() public method

public testAddErrors ( )
    public function testAddErrors()
    {
        $errors = array('field1' => array('rule1' => 'message1'), 'field2' => array('rule2' => 'message2'));
        $document = new \Sokil\Mongo\Document($this->collection);
        $document->addErrors($errors);
        $this->assertEquals($errors, $document->getErrors());
    }