protected function ViewAjaxControllerTest::getCommands in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php \Drupal\Tests\views\Unit\Controller\ViewAjaxControllerTest::getCommands()
- 9 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.
File
- core/
modules/ views/ tests/ src/ Unit/ Controller/ ViewAjaxControllerTest.php, line 423
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');
$reflection_property
->setAccessible(TRUE);
$commands = $reflection_property
->getValue($response);
return $commands;
}