You are here

protected function GTMNoRealmTestCase::checkSnippetFiles in GoogleTagManager 7

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

Inspect the snippet files.

Overrides GTMBaseTestCase::checkSnippetFiles

File

tests/google_tag.norealm.test, line 46

Class

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

Code

protected function checkSnippetFiles() {
  $realm_name = $key_name = '';
  foreach ($this->types as $type) {
    $url = "{$this->basePath}/google_tag/{$realm_name}google_tag.{$key_name}{$type}.js";
    $contents = @file_get_contents($url);
    $function = "verify{$type}Snippet";
    $this
      ->{$function}($contents, $this->variables);
  }
}