function ViewsSqlTest::viewsData

The views data definition.

17 calls to ViewsSqlTest::viewsData()
ViewsHandlerArgumentNullTest::viewsData in tests/handlers/views_handler_argument_null.test
The views data definition.
ViewsHandlerFieldBooleanTest::viewsData in tests/handlers/views_handler_field_boolean.test
The views data definition.
ViewsHandlerFieldCustomTest::viewsData in tests/handlers/views_handler_field_custom.test
The views data definition.
ViewsHandlerFieldDateTest::viewsData in tests/handlers/views_handler_field_date.test
The views data definition.
ViewsHandlerFieldMath::viewsData in tests/handlers/views_handler_field_math.test
The views data definition.

... See full list

16 methods override ViewsSqlTest::viewsData()
ViewsHandlerArgumentNullTest::viewsData in tests/handlers/views_handler_argument_null.test
The views data definition.
ViewsHandlerFieldBooleanTest::viewsData in tests/handlers/views_handler_field_boolean.test
The views data definition.
ViewsHandlerFieldCustomTest::viewsData in tests/handlers/views_handler_field_custom.test
The views data definition.
ViewsHandlerFieldDateTest::viewsData in tests/handlers/views_handler_field_date.test
The views data definition.
ViewsHandlerFieldMath::viewsData in tests/handlers/views_handler_field_math.test
The views data definition.

... See full list

File

tests/views_query.test, line 294

Class

ViewsSqlTest

Code

protected function viewsData() {
    // Declaration of the base table.
    $data['views_test']['table'] = array(
        'group' => t('Views test'),
        'base' => array(
            'field' => 'id',
            'title' => t('Views test'),
            'help' => t('Users who have created accounts on your site.'),
        ),
    );
    // Declaration of fields.
    $data['views_test']['id'] = array(
        'title' => t('ID'),
        'help' => t('The test data ID'),
        'field' => array(
            'handler' => 'views_handler_field_numeric',
            'click sortable' => TRUE,
        ),
        'argument' => array(
            'handler' => 'views_handler_argument_numeric',
        ),
        'filter' => array(
            'handler' => 'views_handler_filter_numeric',
        ),
        'sort' => array(
            'handler' => 'views_handler_sort',
        ),
    );
    $data['views_test']['name'] = array(
        'title' => t('Name'),
        'help' => t('The name of the person'),
        'field' => array(
            'handler' => 'views_handler_field',
            'click sortable' => TRUE,
        ),
        'argument' => array(
            'handler' => 'views_handler_argument_string',
        ),
        'filter' => array(
            'handler' => 'views_handler_filter_string',
        ),
        'sort' => array(
            'handler' => 'views_handler_sort',
        ),
    );
    $data['views_test']['age'] = array(
        'title' => t('Age'),
        'help' => t('The age of the person'),
        'field' => array(
            'handler' => 'views_handler_field_numeric',
            'click sortable' => TRUE,
        ),
        'argument' => array(
            'handler' => 'views_handler_argument_numeric',
        ),
        'filter' => array(
            'handler' => 'views_handler_filter_numeric',
        ),
        'sort' => array(
            'handler' => 'views_handler_sort',
        ),
    );
    $data['views_test']['job'] = array(
        'title' => t('Job'),
        'help' => t('The job of the person'),
        'field' => array(
            'handler' => 'views_handler_field',
            'click sortable' => TRUE,
        ),
        'argument' => array(
            'handler' => 'views_handler_argument_string',
        ),
        'filter' => array(
            'handler' => 'views_handler_filter_string',
        ),
        'sort' => array(
            'handler' => 'views_handler_sort',
        ),
    );
    $data['views_test']['created'] = array(
        'title' => t('Created'),
        'help' => t('The creation date of this record'),
        'field' => array(
            'handler' => 'views_handler_field_date',
            'click sortable' => TRUE,
        ),
        'argument' => array(
            'handler' => 'views_handler_argument_date',
        ),
        'filter' => array(
            'handler' => 'views_handler_filter_date',
        ),
        'sort' => array(
            'handler' => 'views_handler_sort_date',
        ),
    );
    return $data;
}