You are here

function GeofieldBaseTestCase::_testWKTFormatter in Geofield 7.2

5 calls to GeofieldBaseTestCase::_testWKTFormatter()
GeofieldFormatterTestCase::testGeofieldWKTFormatter in tests/geofield.test
GeofieldWidgetTestCase::testGeofieldFieldBoundsWidget in tests/geofield.test
Test Bounds Input.
GeofieldWidgetTestCase::testGeofieldFieldGeoJSONWidget in tests/geofield.test
Test GeoJSON Input.
GeofieldWidgetTestCase::testGeofieldFieldLatLonWidget in tests/geofield.test
Test lat/lon Input.
GeofieldWidgetTestCase::testGeofieldFieldWKTWidget in tests/geofield.test
Test WKT Input.

File

tests/geofield.test, line 9
Tests for geofield.module.

Class

GeofieldBaseTestCase
@file Tests for geofield.module.

Code

function _testWKTFormatter($id, $geometry, $label) {
  $entity = field_test_entity_test_load($id);
  $entity->content = field_attach_view('test_entity', $entity, 'full');
  $this->content = drupal_render($entity->content);
  $value = $geometry
    ->out('wkt');
  $this
    ->assertText($value, 'WKT output for ' . $label . ' widget is correct.');
}