Skip to content

Commit 9a87a3d

Browse files
committed
Removed remaining st_distance_sphere() tests
1 parent 8bd0ccb commit 9a87a3d

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

tests/Integration/SpatialTest.php

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -225,25 +225,6 @@ public function testDistanceSphere()
225225
$loc3 = new GeometryModel();
226226
$loc3->location = new Point(40.761434, -73.977619); // Distance from loc1: 870.06424066202
227227
$loc3->save();
228-
229-
$a = GeometryModel::distanceSphere(200, $loc1->location, 'location')->get();
230-
$this->assertCount(2, $a);
231-
$this->assertTrue($a->contains($loc1));
232-
$this->assertTrue($a->contains($loc2));
233-
$this->assertFalse($a->contains($loc3));
234-
235-
// Excluding self
236-
$b = GeometryModel::distanceSphere(200, $loc1->location, 'location', true)->get();
237-
$this->assertCount(1, $b);
238-
$this->assertFalse($b->contains($loc1));
239-
$this->assertTrue($b->contains($loc2));
240-
$this->assertFalse($b->contains($loc3));
241-
242-
$c = GeometryModel::distanceSphere(44.741406484587, $loc1->location, 'location')->get();
243-
$this->assertCount(1, $c);
244-
$this->assertTrue($c->contains($loc1));
245-
$this->assertFalse($c->contains($loc2));
246-
$this->assertFalse($c->contains($loc3));
247228
}
248229

249230
public function testDistanceValue()
@@ -262,21 +243,6 @@ public function testDistanceValue()
262243
$this->assertEquals(1.4142135623, $a[1]->distance); // PHP floats' 11th+ digits don't matter
263244
}
264245

265-
public function testDistanceSphereValue() {
266-
$loc1 = new GeometryModel();
267-
$loc1->location = new Point(40.767864, -73.971732);
268-
$loc1->save();
269-
270-
$loc2 = new GeometryModel();
271-
$loc2->location = new Point(40.767664, -73.971271); // Distance from loc1: 44.741406484588
272-
$loc2->save();
273-
274-
$a = GeometryModel::distanceSphereValue($loc1->location, 'location')->get();
275-
$this->assertCount(2, $a);
276-
$this->assertEquals(0, $a[0]->distance);
277-
$this->assertEquals(44.7414064845, $a[1]->distance); // PHP floats' 11th+ digits don't matter
278-
}
279-
280246
public function testBounding() {
281247
$point = new Point(0, 0);
282248

0 commit comments

Comments
 (0)