Exemple #1
0
 public function testSkipAndLimit()
 {
     $query = new Query("TestObject");
     $query->limit(100);
     $out = $query->encode();
     $this->assertEquals(100, $out["limit"]);
     // limit is mutable
     $query->limit(87);
     $out = $query->encode();
     $this->assertEquals(87, $out["limit"]);
     $query->skip(25);
     $out = $query->encode();
     $this->assertEquals(25, $out["skip"]);
     // skip is mutable
     $query->skip(42);
     $out = $query->encode();
     $this->assertEquals(42, $out["skip"]);
 }