function HandlerTestTrait::setupExecutableAndView
Same name in other branches
- 8.9.x core/modules/views/tests/src/Unit/Plugin/HandlerTestTrait.php \Drupal\Tests\views\Unit\Plugin\HandlerTestTrait::setupExecutableAndView()
- 10 core/modules/views/tests/src/Unit/Plugin/HandlerTestTrait.php \Drupal\Tests\views\Unit\Plugin\HandlerTestTrait::setupExecutableAndView()
- 11.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.
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 41
Class
- HandlerTestTrait
- Test trait to mock dependencies of a handler.
Namespace
Drupal\Tests\views\Unit\PluginCode
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.