public function GeolocationViewsProximityArgumentTest::testRoundingError in Geolocation Field 8.3
Same name and namespace in other branches
- 8 tests/src/Functional/GeolocationViewsProximityArgumentTest.php \Drupal\Tests\geolocation\Functional\GeolocationViewsProximityArgumentTest::testRoundingError()
- 8.2 tests/src/Functional/GeolocationViewsProximityArgumentTest.php \Drupal\Tests\geolocation\Functional\GeolocationViewsProximityArgumentTest::testRoundingError()
Tests to ensure rounding error doesn't occur (d.o #2796999).
File
- tests/
src/ Functional/ GeolocationViewsProximityArgumentTest.php, line 115
Class
- GeolocationViewsProximityArgumentTest
- Tests the grid style plugin.
Namespace
Drupal\Tests\geolocation\FunctionalCode
public function testRoundingError() {
$entity_test_storage = \Drupal::entityTypeManager()
->getStorage('node');
$entity_test_storage
->create([
'title' => 'Proximity 4',
'body' => 'test test',
'type' => 'geolocation_default_article',
'field_geolocation_demo_single' => [
'lat' => 51.4545,
'lng' => -2.5879,
],
])
->save();
$this
->drupalGet($this->viewsPath . '/51.4545,-2.5879<5mi');
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertSession()
->responseContains('Proximity 4');
}