You are here

protected function GTMTestBase::getSnippetFromFile in GoogleTagManager 8

Returns the snippet contents.

File

tests/src/Functional/GTMTestBase.php, line 221

Class

GTMTestBase
Tests the Google Tag Manager.

Namespace

Drupal\Tests\google_tag\Functional

Code

protected function getSnippetFromFile($key, $type) {
  $url = "{$this->basePath}/google_tag/{$key}/google_tag.{$type}.js";
  return @file_get_contents($url);
}