/** * @covers Paradox\Client::findAllNear */ public function testFindAllNear() { $result = $this->client->findAllNear($this->collectionName, 48, 48, "FILTER doc.name in [@horacio]", array('horacio' => 'Horacio Manuel Cartes Jara'), 2); $this->assertInternalType('array', $result, "The result set should be an array"); $resultItem = reset($result); $this->assertInstanceOf('Paradox\\AModel', $resultItem, 'The result item should be of the type Paradox\\AModel'); $this->assertEquals('Horacio Manuel Cartes Jara', $resultItem->get('name'), 'The name of the found document should be "Horacio Manuel Cartes Jara"'); $this->assertInternalType('float', $resultItem->getDistance()); $coordinates = $resultItem->getReferenceCoordinates(); $this->assertEquals('48', $coordinates['latitude']); $this->assertEquals('48', $coordinates['longitude']); }