function ViewAjaxControllerTest::setUpMockViewStorage
Reinitializes the view storage as a mock object.
3 calls to ViewAjaxControllerTest::setUpMockViewStorage()
- 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.
- ViewAjaxControllerTest::testMissingView in core/
modules/ views/ tests/ src/ Unit/ Controller/ ViewAjaxControllerTest.php - Tests non-existent view with view_name and view_display_id.
File
-
core/
modules/ views/ tests/ src/ Unit/ Controller/ ViewAjaxControllerTest.php, line 200
Class
Namespace
Drupal\Tests\views\Unit\ControllerCode
protected function setUpMockViewStorage() : void {
$this->viewStorage = $this->createMock(EntityStorageInterface::class);
$reflection = new \ReflectionProperty($this->viewAjaxController, 'storage');
$reflection->setValue($this->viewAjaxController, $this->viewStorage);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.