function FilterStringTest::getBasicPageView

Build and return a Page view of the views_test_data table.

Return value

\Drupal\views\ViewExecutable The page view object.

13 calls to FilterStringTest::getBasicPageView()
FilterStringTest::testFilterStringGroupedExposedContains in core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
Tests grouped, exposed filtering with contains operator.
FilterStringTest::testFilterStringGroupedExposedEmpty in core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
Tests grouped and exposed filters with the "empty" operator.
FilterStringTest::testFilterStringGroupedExposedEnds in core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
Tests grouped and exposed filters with the "ends with" operator.
FilterStringTest::testFilterStringGroupedExposedEqual in core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
Returns a set of grouped exposed filters.
FilterStringTest::testFilterStringGroupedExposedLonger in core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php
Tests grouped and exposed filters with the "longer than" operator.

... See full list

File

core/modules/views/tests/src/Kernel/Handler/FilterStringTest.php, line 84

Class

FilterStringTest
Tests the core Drupal\views\Plugin\views\filter\StringFilter handler.

Namespace

Drupal\Tests\views\Kernel\Handler

Code

protected function getBasicPageView() {
  $view = Views::getView('test_view');
  // In order to test exposed filters, we have to disable
  // the exposed forms cache.
  \Drupal::service('views.exposed_form_cache')->reset();
  $view->newDisplay('page', 'Page', 'page_1');
  return $view;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.