You are here

function OpenLayersMaps::testOpenLayersMaps in Openlayers 7.2

Ensure that the map shows up in the interface

File

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

Class

OpenLayersMaps
Test OpenLayers maps.

Code

function testOpenLayersMaps() {
  $user = $this
    ->drupalCreateUser(array(
    'administer openlayers',
  ));
  $this
    ->drupalLogin($user);

  // Go to map page
  $this
    ->drupalGet('admin/structure/openlayers/maps');
  $this
    ->assertResponse(200, t('User can reach map list.'));

  // Ensure that the default test is listed
  $this
    ->assertText(t('Default Map'), t('Assert that the default map\'s title appears.'));

  // Maps
  $this
    ->drupalGet('admin/structure/openlayers/maps/default/export');
  $this
    ->assertResponse(200, t('User can reach default map export page.'));
  $this
    ->drupalGet('admin/structure/openlayers/maps/clone/default');
  $this
    ->assertResponse(200, t('User can reach default map clone page.'));
  $this
    ->drupalGet('admin/structure/openlayers/maps/add');
  $this
    ->assertResponse(200, t('User can reach map add page.'));
}