function ViewAjaxControllerTest::setUpMockViewExecutableFactory

Reinitializes the view executable factory as a mock object.

2 calls to ViewAjaxControllerTest::setUpMockViewExecutableFactory()
ViewAjaxControllerTest::setupValidMocks in core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php
Sets up a bunch of valid mocks of the view executable.
ViewAjaxControllerTest::testAccessDeniedView in core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php
Tests a view without having access to it.

File

core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php, line 191

Class

ViewAjaxControllerTest
Tests Drupal\views\Controller\ViewAjaxController.

Namespace

Drupal\Tests\views\Unit\Controller

Code

protected function setUpMockViewExecutableFactory() : void {
  $this->executableFactory = $this->createMock(ViewExecutableFactory::class);
  $reflection = new \ReflectionProperty($this->viewAjaxController, 'executableFactory');
  $reflection->setValue($this->viewAjaxController, $this->executableFactory);
}

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