protected function ViewAjaxControllerTest::assertViewResultCommand 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::assertViewResultCommand()
- 9 core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php \Drupal\Tests\views\Unit\Controller\ViewAjaxControllerTest::assertViewResultCommand()
Ensures that the main view content command is added.
@internal
Parameters
\Drupal\views\Ajax\ViewAjaxResponse $response: The response object.
int $position: The position where the view content command is expected.
File
- core/
modules/ views/ tests/ src/ Unit/ Controller/ ViewAjaxControllerTest.php, line 440
Class
- ViewAjaxControllerTest
- @coversDefaultClass \Drupal\views\Controller\ViewAjaxController @group views
Namespace
Drupal\Tests\views\Unit\ControllerCode
protected function assertViewResultCommand(ViewAjaxResponse $response, int $position = 0) : void {
$commands = $this
->getCommands($response);
$this
->assertEquals('insert', $commands[$position]['command']);
$this
->assertEquals('View result', $commands[$position]['data']);
}