You are here

protected function ViewTestBase::getView in Views (for Drupal 7) 8.3

Clones the view used in this test and sets the default display.

Parameters

Drupal\views\ViewStorage $original_view: (optional) The view to clone. If not specified, the default view for the test will be used.

Return value

Drupal\views\ViewExecutable A clone of the view.

69 calls to ViewTestBase::getView()
AreaTextTest::testAreaText in lib/Drupal/views/Tests/Handler/AreaTextTest.php
ArgumentDefaultTest::testArgumentDefaultFixed in lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php
Tests fixed default argument.
ArgumentLanguage::testFilter in lib/Drupal/views/Tests/Language/ArgumentLanguage.php
ArgumentNullTest::testAreaText in lib/Drupal/views/Tests/Handler/ArgumentNullTest.php
BasicTest::testSimpleArgument in lib/Drupal/views/Tests/BasicTest.php
Tests simple argument.

... See full list

File

lib/Drupal/views/Tests/ViewTestBase.php, line 434
Definition of Drupal\views\Tests\ViewTestBase.

Class

ViewTestBase
Abstract class for views testing.

Namespace

Drupal\views\Tests

Code

protected function getView($original_view = NULL) {
  if (isset($original_view)) {
    $view = $original_view
      ->cloneView();
  }
  else {
    $view = $this->view
      ->cloneView();
  }
  $view
    ->setDisplay();
  return $view;
}