function CacheTest::viewsData

Same name in other branches
  1. 9 core/modules/views/tests/src/Kernel/Plugin/CacheTest.php \Drupal\Tests\views\Kernel\Plugin\CacheTest::viewsData()
  2. 8.9.x core/modules/views/tests/src/Kernel/Plugin/CacheTest.php \Drupal\Tests\views\Kernel\Plugin\CacheTest::viewsData()
  3. 11.x core/modules/views/tests/src/Kernel/Plugin/CacheTest.php \Drupal\Tests\views\Kernel\Plugin\CacheTest::viewsData()

Overrides ViewsKernelTestBase::viewsData

File

core/modules/views/tests/src/Kernel/Plugin/CacheTest.php, line 52

Class

CacheTest
Tests pluggable caching for views.

Namespace

Drupal\Tests\views\Kernel\Plugin

Code

protected function viewsData() {
    $data = parent::viewsData();
    $data['views_test_data']['test_cache_context'] = [
        'real field' => 'name',
        'title' => 'Test cache context',
        'filter' => [
            'id' => 'views_test_test_cache_context',
        ],
    ];
    return $data;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.