assertCacheTagsForFieldBasedView example

/** * Tests a field-based view's cache tags when using the "none" cache plugin. */
  public function testFieldBasedViewCacheTagsWithCachePluginNone() {
    $view = Views::getview('entity_test_fields');
    $view->getDisplay()->overrideOption('cache', [
      'type' => 'none',
    ]);
    $view->save();

    $this->assertCacheTagsForFieldBasedView(FALSE);
  }

  /** * Tests a field-based view's cache tags when using the "tag" cache plugin. */
  public function testFieldBasedViewCacheTagsWithCachePluginTag() {
    $view = Views::getview('entity_test_fields');
    $view->getDisplay()->overrideOption('cache', [
      'type' => 'tag',
    ]);
    $view->save();

    
Home | Imprint | This part of the site doesn't use cookies.