function ViewTest::setUp

Same name in other branches
  1. 8.9.x core/modules/views/tests/src/Unit/Plugin/area/ViewTest.php \Drupal\Tests\views\Unit\Plugin\area\ViewTest::setUp()
  2. 10 core/modules/views/tests/src/Unit/Plugin/area/ViewTest.php \Drupal\Tests\views\Unit\Plugin\area\ViewTest::setUp()
  3. 11.x core/modules/views/tests/src/Unit/Plugin/area/ViewTest.php \Drupal\Tests\views\Unit\Plugin\area\ViewTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/views/tests/src/Unit/Plugin/area/ViewTest.php, line 31

Class

ViewTest
@coversDefaultClass \Drupal\views\Plugin\views\area\View @group views

Namespace

Drupal\Tests\views\Unit\Plugin\area

Code

protected function setUp() : void {
    parent::setUp();
    $this->entityStorage = $this->createMock('Drupal\\Core\\Entity\\EntityStorageInterface');
    $this->viewHandler = new ViewAreaPlugin([], 'view', [], $this->entityStorage);
    $this->viewHandler->view = $this->getMockBuilder('Drupal\\views\\ViewExecutable')
        ->disableOriginalConstructor()
        ->getMock();
}

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