From 80f7dc77d430774192b929d780f96260066df2ee Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 18 Oct 2015 09:31:31 +0200 Subject: Update to MediaWiki 1.25.3 --- .../lib/Elastica/Test/Filter/GeohashCellTest.php | 60 ---------------------- 1 file changed, 60 deletions(-) delete mode 100644 vendor/ruflin/elastica/test/lib/Elastica/Test/Filter/GeohashCellTest.php (limited to 'vendor/ruflin/elastica/test/lib/Elastica/Test/Filter/GeohashCellTest.php') diff --git a/vendor/ruflin/elastica/test/lib/Elastica/Test/Filter/GeohashCellTest.php b/vendor/ruflin/elastica/test/lib/Elastica/Test/Filter/GeohashCellTest.php deleted file mode 100644 index 7cb8aef6..00000000 --- a/vendor/ruflin/elastica/test/lib/Elastica/Test/Filter/GeohashCellTest.php +++ /dev/null @@ -1,60 +0,0 @@ - 37.789018, 'lon' => -122.391506), '50m'); - $expected = array( - 'geohash_cell' => array( - 'pin' => array( - 'lat' => 37.789018, - 'lon' => -122.391506 - ), - 'precision' => '50m', - 'neighbors' => false - ) - ); - $this->assertEquals($expected, $filter->toArray()); - } - - public function testFilter() - { - $index = $this->_createIndex('geohash_filter_test'); - $type = $index->getType('test'); - $mapping = new \Elastica\Type\Mapping($type, array( - 'pin' => array( - 'type' => 'geo_point', - 'geohash' => true, - 'geohash_prefix' => true - ) - )); - $type->setMapping($mapping); - - $type->addDocument(new \Elastica\Document(1, array('pin' => '9q8yyzm0zpw8'))); - $type->addDocument(new \Elastica\Document(2, array('pin' => '9mudgb0yued0'))); - $index->refresh(); - - $filter = new GeohashCell('pin', array('lat' => 32.828326, 'lon' => -117.255854)); - $query = new \Elastica\Query(); - $query->setFilter($filter); - $results = $type->search($query); - - $this->assertEquals(1, $results->count()); - - //test precision parameter - $filter = new GeohashCell('pin', '9', 1); - $query = new \Elastica\Query(); - $query->setFilter($filter); - $results = $type->search($query); - - $this->assertEquals(2, $results->count()); - - $index->delete(); - } -} -- cgit v1.2.3-54-g00ecf