public function testIsValid_TypeValidator_DefaultMessageForOneType()
{
// mock of document
$document = $this->getMock('\\Sokil\\Mongo\\Document', array('rules'), array($this->collection));
$document->expects($this->any())->method('rules')->will($this->returnValue(array(array('some-field-name', 'type', array('int')))));
$document->set('some-field-name', 'iAmNot42');
$this->assertFalse($document->isValid());
$this->assertEquals(array('some-field-name' => array('type' => 'Field "some-field-name" must be of type int in Sokil\\Mongo\\Validator\\TypeValidator')), $document->getErrors());
}