Example #1
0
 /**
  * @covers Paradox\Client::findOneWithin
  */
 public function testFindOneWithin()
 {
     $result = $this->client->findOneWithin($this->collectionName, 48, 48, 1000000, "doc.name in [@horacio]", array('horacio' => 'Horacio Manuel Cartes Jara'));
     $this->assertInstanceOf('Paradox\\AModel', $result, 'The result item should be of the type Paradox\\AModel');
     $this->assertEquals('Horacio Manuel Cartes Jara', $result->get('name'), 'The name of the found document should be "Horacio Manuel Cartes Jara"');
     $this->assertInternalType('float', $result->getDistance());
     $coordinates = $result->getReferenceCoordinates();
     $this->assertEquals('48', $coordinates['latitude']);
     $this->assertEquals('48', $coordinates['longitude']);
 }