You are here

protected function GTMBaseTestCase::checkPageResponse in GoogleTagManager 7

Same name and namespace in other branches
  1. 7.2 tests/google_tag.base.test \GTMBaseTestCase::checkPageResponse()

Inspect the page response.

3 calls to GTMBaseTestCase::checkPageResponse()
GTMBaseTestCase::testModule in tests/google_tag.base.test
Test the module.
GTMNoRealmTestCase::checkPageResponse in tests/google_tag.norealm.test
Inspect the page response.
GTMRealmTestCase::checkPageResponse in tests/google_tag.realm.test
Inspect the page response.
2 methods override GTMBaseTestCase::checkPageResponse()
GTMNoRealmTestCase::checkPageResponse in tests/google_tag.norealm.test
Inspect the page response.
GTMRealmTestCase::checkPageResponse in tests/google_tag.realm.test
Inspect the page response.

File

tests/google_tag.base.test, line 119

Class

GTMBaseTestCase
Tests the Google Tag Manager.

Code

protected function checkPageResponse() {
  variable_set('google_tag_role_toggle', 'include listed');
  variable_set('google_tag_role_list', array(
    'content viewer' => 'content viewer',
  ));

  // Create and login a test user.
  $role_id = $this
    ->drupalCreateRole(array(
    'access content',
  ), 'content viewer');
  $non_admin_user = $this
    ->drupalCreateUser();
  $non_admin_user->roles[$role_id] = 'content viewer';
  user_save($non_admin_user);
  $this
    ->drupalLogin($non_admin_user);
}