protected function ViewsDataHelperTest::viewsData in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Unit/ViewsDataHelperTest.php \Drupal\Tests\views\Unit\ViewsDataHelperTest::viewsData()
- 9 core/modules/views/tests/src/Unit/ViewsDataHelperTest.php \Drupal\Tests\views\Unit\ViewsDataHelperTest::viewsData()
Returns the views data definition.
Return value
array
File
- core/
modules/ views/ tests/ src/ Unit/ ViewsDataHelperTest.php, line 20
Class
- ViewsDataHelperTest
- @coversDefaultClass \Drupal\views\ViewsDataHelper @group views
Namespace
Drupal\Tests\views\UnitCode
protected function viewsData() {
$data = ViewTestData::viewsData();
// Tweak the views data to have a base for testing
// \Drupal\views\ViewsDataHelper::fetchFields().
unset($data['views_test_data']['id']['field']);
unset($data['views_test_data']['name']['argument']);
unset($data['views_test_data']['age']['filter']);
unset($data['views_test_data']['job']['sort']);
$data['views_test_data']['created']['area']['id'] = 'text';
$data['views_test_data']['age']['area']['id'] = 'text';
$data['views_test_data']['age']['area']['sub_type'] = 'header';
$data['views_test_data']['job']['area']['id'] = 'text';
$data['views_test_data']['job']['area']['sub_type'] = [
'header',
'footer',
];
return $data;
}