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); } }
function testInvalidLimits() { $c = new Model1(); $this->assertFalse($c->limit(-1, 5)); $this->assertFalse($c->limit(5, -1)); $this->assertFalse($c->limit(-1, -5)); }