You are here

public function FieldDateTest::viewsData in Drupal 9

Same name and namespace in other branches
  1. 8 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()

Returns the views data definition.

Overrides ViewsKernelTestBase::viewsData

File

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

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;
}