function ViewAjaxControllerTest::setUpMockRedirectDestination

Reinitializes the redirect destination as a mock object.

3 calls to ViewAjaxControllerTest::setUpMockRedirectDestination()
ViewAjaxControllerTest::testAjaxView in core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php
Tests a valid view without arguments pagers etc.
ViewAjaxControllerTest::testAjaxViewViewPathNoSlash in core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php
Tests a valid view with a view_path with no slash.
ViewAjaxControllerTest::testInvalidPath in core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php
Tests a valid view without arguments pagers etc.

File

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

Class

ViewAjaxControllerTest
Tests Drupal\views\Controller\ViewAjaxController.

Namespace

Drupal\Tests\views\Unit\Controller

Code

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

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