function EntityTest::setUpMockStylePlugin
Reinitializes the style plugin as a mock object.
1 call to EntityTest::setUpMockStylePlugin()
- EntityTest::testRenderWithIdAndToken in core/
modules/ views/ tests/ src/ Unit/ Plugin/ area/ EntityTest.php - Tests render with id and token.
File
-
core/
modules/ views/ tests/ src/ Unit/ Plugin/ area/ EntityTest.php, line 147
Class
Namespace
Drupal\Tests\views\Unit\Plugin\areaCode
protected function setUpMockStylePlugin() : void {
$this->stylePlugin = $this->createMock(StylePluginBase::class);
$this->display = $this->createMock(DisplayPluginBase::class);
$this->display
->method('getPlugin')
->with('style')
->willReturn($this->stylePlugin);
$this->executable = $this->createMock(ViewExecutable::class);
$this->executable->style_plugin = $this->stylePlugin;
$this->executable
->expects($this->atLeastOnce())
->method('getStyle')
->willReturn($this->stylePlugin);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.