protected function ViewsDataHelperTest::viewsData in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Unit/ViewsDataHelperTest.php \Drupal\Tests\views\Unit\ViewsDataHelperTest::viewsData()
Returns the views data definition.
Return value
array
1 call to ViewsDataHelperTest::viewsData()
- ViewsDataHelperTest::testFetchFields in core/
modules/ views/ tests/ src/ Unit/ ViewsDataHelperTest.php - Tests fetchFields.
File
- core/
modules/ views/ tests/ src/ Unit/ ViewsDataHelperTest.php, line 25 - Contains \Drupal\Tests\views\Unit\ViewsDataHelperTest.
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'] = array(
'header',
'footer',
);
return $data;
}