Beispiel #1
0
 function testArrayUnsetNull()
 {
     $arr = array(1, 2, 3, 4);
     $doc = new Dummy();
     $doc->arr = $arr;
     $doc->save();
     unset($arr[1], $arr[3]);
     $doc->arr = $arr;
     $doc->save();
     $this->assertEquals($arr, $doc->arr);
 }
Beispiel #2
0
 function testDrop()
 {
     $c = new Dummy();
     $c['foo'] = 'bar';
     $c->save();
     $this->assertFalse(ActiveMongo::drop());
     $this->assertTrue(Dummy::drop());
     try {
         $this->assertFalse(Dummy::drop());
     } catch (ActiveMongo_Exception $e) {
         $this->assertTrue(TRUE);
     }
 }