function HandlerTestTrait::setupExecutableAndView

Same name and namespace in other branches
  1. 11.x core/modules/views/tests/src/Unit/Plugin/HandlerTestTrait.php \Drupal\Tests\views\Unit\Plugin\HandlerTestTrait::setupExecutableAndView()
  2. 10 core/modules/views/tests/src/Unit/Plugin/HandlerTestTrait.php \Drupal\Tests\views\Unit\Plugin\HandlerTestTrait::setupExecutableAndView()
  3. 9 core/modules/views/tests/src/Unit/Plugin/HandlerTestTrait.php \Drupal\Tests\views\Unit\Plugin\HandlerTestTrait::setupExecutableAndView()
  4. 8.9.x core/modules/views/tests/src/Unit/Plugin/HandlerTestTrait.php \Drupal\Tests\views\Unit\Plugin\HandlerTestTrait::setupExecutableAndView()

Sets up a view executable and a view entity.

1 call to HandlerTestTrait::setupExecutableAndView()
FieldTest::setUp in core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php

File

core/modules/views/tests/src/Unit/Plugin/HandlerTestTrait.php, line 48

Class

HandlerTestTrait
Test trait to mock dependencies of a handler.

Namespace

Drupal\Tests\views\Unit\Plugin

Code

protected function setupExecutableAndView() {
  $this->view = $this->createStub(View::class);
  $this->executable = $this->createStub(ViewExecutable::class);
  $this->executable->storage = $this->view;
}

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