Example #1
0
 /**
  * @covers Paradox\Client::findOneNear
  */
 public function testFindOneNear()
 {
     $result = $this->client->findOneNear($this->collectionName, 48, 48, "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']);
 }