You are here

function ALProfilesWebTest::testSegments in Acquia Lift Connector 7.2

Same name and namespace in other branches
  1. 7 acquia_lift_profiles/tests/acquia_lift_profiles.test \ALProfilesWebTest::testSegments()

Tests that available segments are added to the page.

File

acquia_lift_profiles/tests/acquia_lift_profiles.test, line 199
Tests for Acquia Lift Profiles module.

Class

ALProfilesWebTest
Tests Acquia Lift Profiles functionality.

Code

function testSegments() {
  $this
    ->configureALProfiles();
  $this
    ->drupalLogin($this->admin_user);
  $this
    ->drupalGet('');

  // The dummy http client used during web tests has two segments set up that
  // will always be returned by a call to getSegments().
  $test_segments = array(
    'segment1',
    'segment2',
  );

  // Test that the segments show up in the js settings.
  $settings = $this
    ->drupalGetSettings();
  $this
    ->assertEqual($settings['acquia_lift_profiles']['available_segments'], $test_segments);
}