protected function GTMMultipleTest::checkSnippetContents in GoogleTagManager 8
Inspect the snippet contents.
Overrides GTMTestBase::checkSnippetContents
File
- tests/
src/ Functional/ GTMMultipleTest.php, line 52
Class
- GTMMultipleTest
- Tests the Google Tag Manager for a site with multiple containers.
Namespace
Drupal\Tests\google_tag\FunctionalCode
protected function checkSnippetContents() {
foreach ($this->variables as $key => $variables) {
$message = "Start on container {$key}";
parent::assertTrue(TRUE, $message);
foreach ($this->types as $type) {
$function = $type == 'noscript' ? 'getSnippetFromCache' : 'getSnippetFromFile';
$contents = $this
->{$function}($key, $type);
$function = "verify{$type}Snippet";
$this
->{$function}($contents, $this->variables[$key]);
}
}
}