You are here

protected function HandlerTestTrait::setupExecutableAndView in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 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.

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

File

core/modules/views/tests/src/Unit/Plugin/HandlerTestTrait.php, line 46
Contains \Drupal\Tests\views\Unit\Plugin\HandlerTestTrait.

Class

HandlerTestTrait
Test trait to mock dependencies of a handler.

Namespace

Drupal\Tests\views\Unit\Plugin

Code

protected function setupExecutableAndView() {
  $this->view = $this
    ->getMockBuilder('Drupal\\views\\Entity\\View')
    ->disableOriginalConstructor()
    ->getMock();
  $this->executable = $this
    ->getMockBuilder('Drupal\\views\\ViewExecutable')
    ->disableOriginalConstructor()
    ->getMock();
  $this->executable->storage = $this->view;
}