You are here

public function ArgumentDateTest::viewsData in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Tests/Handler/ArgumentDateTest.php \Drupal\views\Tests\Handler\ArgumentDateTest::viewsData()

Returns the views data definition.

Overrides ViewKernelTestBase::viewsData

File

core/modules/views/src/Tests/Handler/ArgumentDateTest.php, line 40
Contains \Drupal\views\Tests\Handler\ArgumentDateTest.

Class

ArgumentDateTest
Tests the core date argument handlers.

Namespace

Drupal\views\Tests\Handler

Code

public function viewsData() {
  $data = parent::viewsData();
  $date_plugins = array(
    'date_fulldate',
    'date_day',
    'date_month',
    'date_week',
    'date_year',
    'date_year_month',
  );
  foreach ($date_plugins as $plugin_id) {
    $data['views_test_data'][$plugin_id] = $data['views_test_data']['created'];
    $data['views_test_data'][$plugin_id]['real field'] = 'created';
    $data['views_test_data'][$plugin_id]['argument']['id'] = $plugin_id;
  }
  return $data;
}