function ResultTest::setUp

Same name in other branches
  1. 9 core/modules/views/tests/src/Unit/Plugin/area/ResultTest.php \Drupal\Tests\views\Unit\Plugin\area\ResultTest::setUp()
  2. 10 core/modules/views/tests/src/Unit/Plugin/area/ResultTest.php \Drupal\Tests\views\Unit\Plugin\area\ResultTest::setUp()
  3. 11.x 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\area

Code

protected function setUp() {
    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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.