You are here

protected function GTMTestBase::getSnippetFromCache in GoogleTagManager 8

Returns the snippet contents.

1 call to GTMTestBase::getSnippetFromCache()
GTMMultipleTest::checkPageResponseInline in tests/src/Functional/GTMMultipleTest.php
Inspect the page response (based on inline snippet).

File

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

Class

GTMTestBase
Tests the Google Tag Manager.

Namespace

Drupal\Tests\google_tag\Functional

Code

protected function getSnippetFromCache($key, $type) {
  $cid = "google_tag:{$type}:{$key}";
  $cache = $this->container
    ->get('cache.data')
    ->get($cid);
  return $cache ? $cache->data : '';
}