Exemplo n.º 1
0
 public function testReferencesWithFindAndReferences()
 {
     try {
         $c = new Model1();
         $c->where('int <= ', 1000);
         $c->where('processing exists', FALSE);
         $c->limit(50);
         $c->sort('int DESC');
         $c->findAndModify(array("processing" => TRUE));
         $invalid_ref = $c->getReference(TRUE);
         $this->assertTrue(FALSE);
     } catch (ActiveMongo_Exception $e) {
         $this->assertTrue(TRUE);
     }
 }
Exemplo n.º 2
0
 function testInvalidLimits()
 {
     $c = new Model1();
     $this->assertFalse($c->limit(-1, 5));
     $this->assertFalse($c->limit(5, -1));
     $this->assertFalse($c->limit(-1, -5));
 }