protected function ResultTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Unit/Plugin/area/ResultTest.php \Drupal\Tests\views\Unit\Plugin\area\ResultTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
modules/ views/ tests/ src/ Unit/ Plugin/ area/ ResultTest.php, line 35
Class
- ResultTest
- @coversDefaultClass \Drupal\views\Plugin\views\area\Result @group views
Namespace
Drupal\Tests\views\Unit\Plugin\areaCode
protected function setUp() : void {
parent::setUp();
$storage = $this
->prophesize(View::class);
$storage
->label()
->willReturn('ResultTest');
$storage
->set(Argument::cetera())
->willReturn(NULL);
$user = $this
->prophesize(AccountInterface::class)
->reveal();
$views_data = $this
->prophesize(ViewsData::class)
->reveal();
$route_provider = $this
->prophesize(RouteProviderInterface::class)
->reveal();
$this->view = new ViewExecutable($storage
->reveal(), $user, $views_data, $route_provider);
$this->resultHandler = new Result([], 'result', []);
$this->resultHandler->view = $this->view;
}