function BlockTest::setUp
Same name in other branches
- 9 core/modules/views/tests/src/Unit/Plugin/views/display/BlockTest.php \Drupal\Tests\views\Unit\Plugin\views\display\BlockTest::setUp()
- 8.9.x core/modules/views/tests/src/Unit/Plugin/views/display/BlockTest.php \Drupal\Tests\views\Unit\Plugin\views\display\BlockTest::setUp()
- 11.x core/modules/views/tests/src/Unit/Plugin/views/display/BlockTest.php \Drupal\Tests\views\Unit\Plugin\views\display\BlockTest::setUp()
Overrides UnitTestCase::setUp
File
-
core/
modules/ views/ tests/ src/ Unit/ Plugin/ views/ display/ BlockTest.php, line 39
Class
- BlockTest
- @coversDefaultClass \Drupal\views\Plugin\views\display\Block @group block
Namespace
Drupal\Tests\views\Unit\Plugin\views\displayCode
protected function setUp() : void {
parent::setUp();
$this->executable = $this->getMockBuilder('Drupal\\views\\ViewExecutable')
->disableOriginalConstructor()
->onlyMethods([
'executeDisplay',
'setDisplay',
'setItemsPerPage',
])
->getMock();
$this->executable
->expects($this->any())
->method('setDisplay')
->with('block_1')
->willReturn(TRUE);
$this->blockDisplay = $this->executable->display_handler = $this->getMockBuilder('Drupal\\views\\Plugin\\views\\display\\Block')
->disableOriginalConstructor()
->onlyMethods([])
->getMock();
$this->blockDisplay->view = $this->executable;
$this->blockPlugin = $this->getMockBuilder('Drupal\\views\\Plugin\\Block\\ViewsBlock')
->disableOriginalConstructor()
->getMock();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.