function ViewAjaxControllerTest::getCommands
Same name in other branches
- 9 core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php \Drupal\Tests\views\Unit\Controller\ViewAjaxControllerTest::getCommands()
- 8.9.x core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php \Drupal\Tests\views\Unit\Controller\ViewAjaxControllerTest::getCommands()
- 11.x core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php \Drupal\Tests\views\Unit\Controller\ViewAjaxControllerTest::getCommands()
Gets the commands entry from the response object.
Parameters
\Drupal\views\Ajax\ViewAjaxResponse $response: The views ajax response object.
Return value
mixed Returns the commands.
2 calls to ViewAjaxControllerTest::getCommands()
- ViewAjaxControllerTest::assertViewResultCommand in core/
modules/ views/ tests/ src/ Unit/ Controller/ ViewAjaxControllerTest.php - Ensures that the main view content command is added.
- ViewAjaxControllerTest::testAjaxViewWithPager in core/
modules/ views/ tests/ src/ Unit/ Controller/ ViewAjaxControllerTest.php - Tests a valid view with a pager.
File
-
core/
modules/ views/ tests/ src/ Unit/ Controller/ ViewAjaxControllerTest.php, line 447
Class
- ViewAjaxControllerTest
- @coversDefaultClass \Drupal\views\Controller\ViewAjaxController @group views
Namespace
Drupal\Tests\views\Unit\ControllerCode
protected function getCommands(ViewAjaxResponse $response) {
$reflection_property = new \ReflectionProperty('Drupal\\views\\Ajax\\ViewAjaxResponse', 'commands');
$commands = $reflection_property->getValue($response);
return $commands;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.