You are here

public function CacheTest::testSubqueryStringCache in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Tests/Plugin/CacheTest.php \Drupal\views\Tests\Plugin\CacheTest::testSubqueryStringCache()

Tests that Subqueries are cached as expected.

File

core/modules/views/src/Tests/Plugin/CacheTest.php, line 310
Contains \Drupal\views\Tests\Plugin\CacheTest.

Class

CacheTest
Tests pluggable caching for views.

Namespace

Drupal\views\Tests\Plugin

Code

public function testSubqueryStringCache() {

  // Execute the view.
  $view = Views::getView('test_groupwise_term_ui');
  $view
    ->setDisplay();
  $this
    ->executeView($view);

  // Request for the cache.
  $cid = 'views_relationship_groupwise_max:test_groupwise_term_ui:default:tid_representative';
  $cache = \Drupal::cache('data')
    ->get($cid);
  $this
    ->assertEqual($cid, $cache->cid, 'Subquery String cached as expected.');
}