You are here

protected function GTMMultipleTest::checkPageResponseFile in GoogleTagManager 8

Inspect the page response (based on file source).

1 call to GTMMultipleTest::checkPageResponseFile()
GTMMultipleTest::checkPageResponse in tests/src/Functional/GTMMultipleTest.php
Inspect the page response.

File

tests/src/Functional/GTMMultipleTest.php, line 78

Class

GTMMultipleTest
Tests the Google Tag Manager for a site with multiple containers.

Namespace

Drupal\Tests\google_tag\Functional

Code

protected function checkPageResponseFile() {
  foreach ($this->variables as $key => $variables) {
    $this
      ->drupalGet('');
    $message = "Start on container {$key}";
    parent::assertTrue(TRUE, $message);
    foreach ($this->types as $type) {
      $uri = "{$this->basePath}/google_tag/{$key}/google_tag.{$type}.js";
      $url = file_url_transform_relative(file_create_url($uri));
      $function = "verify{$type}Tag";
      $this
        ->{$function}($url, $this->variables[$key]);
    }
  }
}