Phalcon\Test\Validation\Validator\MongoIdTest::testEmptyMongoIdValueWithAllowEmptyOption PHP Method

testEmptyMongoIdValueWithAllowEmptyOption() public method

    public function testEmptyMongoIdValueWithAllowEmptyOption()
    {
        $array = ['id' => ''];
        $this->testable->setOption('allowEmpty', true);
        $this->validation->add('id', $this->testable);
        $messages = $this->validation->validate($array);
        $this->assertEquals(0, count($messages));
    }