You are here

function OpenLayersCore::testRender in Openlayers 7.2

Test map rendering

File

tests/openlayers.test, line 52
Main OpenLayers Test file

Class

OpenLayersCore
Test the OpenLayers core functionality.

Code

function testRender() {
  $rendered = openlayers_render_map();

  //$this->verbose('Map output: ' . var_export($rendered, TRUE));

  // Check output
  $this
    ->assertTrue(stripos($rendered, 'default') !== FALSE, t('Default name found'));
  $this
    ->assertTrue(stripos($rendered, 'id="openlayers-container-openlayers-map') !== FALSE, t('Container ID found'));
  $this
    ->assertTrue(stripos($rendered, 'id="openlayers-map') !== FALSE, t('Map ID found'));
  $this
    ->assertTrue(stripos($rendered, 'class="openlayers-map') !== FALSE, t('Map Class found'));
}