You are here

protected function GTMRealmTestCase::setRealmVariables__DEP in GoogleTagManager 7

Set realm variables in the variable_store table.

File

tests/google_tag.realm.test, line 94

Class

GTMRealmTestCase
Tests the Google Tag Manager for a site with realms.

Code

protected function setRealmVariables__DEP() {
  foreach ($this->variables as $key => $variables) {
    $realm = $key == 'default' ? 'global' : 'gtm_test';
    foreach ($variables as $name => $value) {

      // This involves writes to the variable_store table whereas
      // variable_realm_add() only sets the internal cache.
      variable_realm_set($realm, $key, $name, $value, $rebuild = FALSE);
    }
  }
}