protected function BlockTest::setUp in Drupal 8
Same name and namespace in other branches
- 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() {
parent::setUp();
$this->executable = $this
->getMockBuilder('Drupal\\views\\ViewExecutable')
->disableOriginalConstructor()
->setMethods([
'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()
->setMethods(NULL)
->getMock();
$this->blockDisplay->view = $this->executable;
$this->blockPlugin = $this
->getMockBuilder('Drupal\\views\\Plugin\\Block\\ViewsBlock')
->disableOriginalConstructor()
->getMock();
}