示例#1
0
 public function testRegex()
 {
     $property = new Regex("AProperty");
     $data = '/bob/';
     $property->setValue($data);
     $this->assertEquals($data, $property->getValue());
     $this->assertInstanceOf('\MongoRegex', $property->__getRawValue());
     $this->assertEquals($data, '/' . $property->__getRawValue()->regex . '/');
 }