You are here

protected function GTMNoRealmTestCase::createData in GoogleTagManager 7

Same name and namespace in other branches
  1. 7.2 tests/google_tag.norealm.test \GTMNoRealmTestCase::createData()

Create test data: configuration variables and snippet files.

Overrides GTMBaseTestCase::createData

File

tests/google_tag.norealm.test, line 29

Class

GTMNoRealmTestCase
Tests the Google Tag Manager for a site with no realms.

Code

protected function createData() {
  $this->variables = (object) ($variables = array(
    'google_tag_container_id' => 'GTM-norealm',
    'google_tag_environment_id' => 'env-6',
    'google_tag_environment_token' => 'nnnnnnnnnnnnnnnnnnnnn',
    'google_tag_include_environment' => '1',
  ));
  array_walk($variables, function ($value, $key) {
    variable_set($key, $value);
  });
  google_tag_assets_create();
}