public function testIsValid_NumericField()
{
// 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', 'numeric'))));
// required field empty
$this->assertTrue($document->isValid());
// required field set to wrong value
$document->set('some-field-name', 'wrongValue');
$this->assertFalse($document->isValid());
// required field set to valid value
$document->set('some-field-name', 23);
$this->assertTrue($document->isValid());
}