protected function BlockTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Unit/Plugin/views/display/BlockTest.php \Drupal\Tests\views\Unit\Plugin\views\display\BlockTest::setUp()
- 9 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 37
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')
->will($this
->returnValue(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();
}