function HandlerTestTrait::setupViewsData

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

Sets up a mocked views data object.

2 calls to HandlerTestTrait::setupViewsData()
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 56

Class

HandlerTestTrait
Test trait to mock dependencies of a handler.

Namespace

Drupal\Tests\views\Unit\Plugin

Code

protected function setupViewsData() {
    $this->viewsData = $this->getMockBuilder('Drupal\\views\\ViewsData')
        ->disableOriginalConstructor()
        ->getMock();
}

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