function FieldDateTest::viewsData

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

Overrides ViewsKernelTestBase::viewsData

File

core/modules/views/tests/src/Kernel/Handler/FieldDateTest.php, line 41

Class

FieldDateTest
Tests the core Drupal\views\Plugin\views\field\Date handler.

Namespace

Drupal\Tests\views\Kernel\Handler

Code

public function viewsData() {
    $data = parent::viewsData();
    $data['views_test_data']['created']['field']['id'] = 'date';
    $data['views_test_data']['destroyed'] = [
        'title' => 'Destroyed',
        'help' => 'Date in future this will be destroyed.',
        'field' => [
            'id' => 'date',
        ],
        'argument' => [
            'id' => 'date',
        ],
        'filter' => [
            'id' => 'date',
        ],
        'sort' => [
            'id' => 'date',
        ],
    ];
    return $data;
}

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