public function testGeoBox() { $this->markTestSkipped("server bug"); return; $this->object->ensureIndex(array("loc" => "2d"), array("min" => 0, "max" => 10)); for ($i = 1; $i < 10; $i++) { for ($j = 1; $j < 10; $j++) { $this->object->insert(array("loc" => array($i, $j))); } } $cursor = $this->object->find(array("loc" => array('$within' => array('$box' => array(array(4, 4), array(6, 6))))))->sort(array("loc" => 1)); for ($i = 4; $i < 7; $i++) { for ($j = 4; $j < 7; $j++) { $val = $cursor->getNext(); $this->assertEquals($i, $val['loc'][0]); $this->assertEquals($j, $val['loc'][1]); } } }