You are here

public function AcquiaLiftWebTestConfig::testLiftAgentAvailibility in Acquia Lift Connector 7

File

tests/acquia_lift.test, line 370
Integration tests for Acquia Lift module.

Class

AcquiaLiftWebTestConfig

Code

public function testLiftAgentAvailibility() {

  // remove the account information
  $lift_info = variable_get('acquia_lift_account_info', array());
  variable_del('acquia_lift_account_info');
  $this
    ->resetAll();

  // Try to add a new campaign and verify that the Acquia Lift agent isn't presented.
  $this
    ->drupalGet('admin/structure/personalize/add');
  $this
    ->assertText(t('Your Acquia Lift account info has not been configured.'));
  $this
    ->assertNoRaw('<option value="acquia_lift">acquia_lift</option>');

  // Add the configuration information for the Lift account.
  $this
    ->configureAcquiaLiftAccount();
  $this
    ->drupalLogin($this->managerUser);

  // Now confirm that Acquia Lift is an option for new campaigns.
  $this
    ->drupalGet('admin/structure/personalize/add');
  $this
    ->assertNoText(t('Your Acquia Lift account info has not been configured.'));
  $this
    ->assertRaw('<option value="acquia_lift">acquia_lift</option>');
}