You are here

protected function ViewsHandlerManagerTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/tests/src/Unit/ViewsHandlerManagerTest.php \Drupal\Tests\views\Unit\ViewsHandlerManagerTest::setUp()
  2. 10 core/modules/views/tests/src/Unit/ViewsHandlerManagerTest.php \Drupal\Tests\views\Unit\ViewsHandlerManagerTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/views/tests/src/Unit/ViewsHandlerManagerTest.php, line 44

Class

ViewsHandlerManagerTest
Tests the ViewsHandlerManager class.

Namespace

Drupal\Tests\views\Unit

Code

protected function setUp() {
  parent::setUp();
  $this->viewsData = $this
    ->getMockBuilder('Drupal\\views\\ViewsData')
    ->disableOriginalConstructor()
    ->getMock();
  $cache_backend = $this
    ->createMock('Drupal\\Core\\Cache\\CacheBackendInterface');
  $this->moduleHandler = $this
    ->createMock('Drupal\\Core\\Extension\\ModuleHandlerInterface');
  $this->handlerManager = new ViewsHandlerManager('test', new \ArrayObject([]), $this->viewsData, $cache_backend, $this->moduleHandler);
}