You are here

protected function EntityFieldQueryViewsTestBase::view in EntityFieldQuery Views Backend 8

3 calls to EntityFieldQueryViewsTestBase::view()
EntityFieldQueryViewsFilterTest::testFilters in src/Tests/EntityFieldQueryFilterTest.php
EntityFieldQueryViewsQueryTagsTest::view in src/Tests/EntityFieldQueryViewsQueryTagsTest.php
EntityFieldQueryViewsTestBase::runView in src/Tests/EntityFieldQueryViewsTestBase.php
2 methods override EntityFieldQueryViewsTestBase::view()
EntityFieldQueryViewsNodeLinkTest::view in src/Tests/EntityFieldQueryViewsNodeLinkTest.php
EntityFieldQueryViewsQueryTagsTest::view in src/Tests/EntityFieldQueryViewsQueryTagsTest.php

File

src/Tests/EntityFieldQueryViewsTestBase.php, line 71
Tests for EFQ Views query features.

Class

EntityFieldQueryViewsTestBase
Abstract class for EFQ views testing.

Namespace

Drupal\efq_views\Tests

Code

protected function view() {
  $view = new view();
  $view->base_table = 'efq_efq_views_test';

  /* Display: Master */
  $handler = $view
    ->new_display('default');
  $handler->display->display_options['row_options']['default_field_elements'] = FALSE;
  $fields = array(
    'entity_id',
    'eid',
    'language',
    'test_boolean',
    'test_date',
    'test_decimal',
    'test_duration',
    'test_integer',
    'test_text',
    'uid',
    'url',
    'field_boolean',
    'bundle',
    'bundle_label',
    'label',
  );
  foreach ($fields as $field) {
    $handler->display->display_options['fields'][$field] = array(
      'id' => $field,
      'field' => $field,
      'table' => 'efq_efq_views_test',
    );
  }
  return $view;
}