Beispiel #1
0
 public function testNear()
 {
     $c = new MingoCriteria();
     // sf...
     $lat = 37.775;
     $long = -122.4183333;
     $c->nearField('foo', array($lat, $long), 50);
     $test_map = array('foo' => array('$near' => array($lat, $long), '$maxDistance' => 50));
     $this->assertTrue($c->hasWhere());
     $where_map = $c->getWhere();
     $this->assertSame($test_map, $where_map);
 }