protected function WebformBrowserTestTrait::getExport in Webform 6.x
Same name and namespace in other branches
- 8.5 tests/src/Traits/WebformBrowserTestTrait.php \Drupal\Tests\webform\Traits\WebformBrowserTestTrait::getExport()
Request a webform results export CSV.
Parameters
\Drupal\webform\WebformInterface $webform: A webform.
array $options: An associative array of export options.
3 calls to WebformBrowserTestTrait::getExport()
- WebformElementTableSelectSortTest::testTableSelectSort in tests/
src/ Functional/ Element/ WebformElementTableSelectSortTest.php - Tests table select and sort elements.
- WebformExporterOptionsTest::testExporterOptions in tests/
src/ Functional/ Exporter/ WebformExporterOptionsTest.php - Test exporter options.
- WebformResultsExportOptionsTest::testExportOptions in tests/
src/ Functional/ WebformResultsExportOptionsTest.php - Tests export options.
File
- tests/
src/ Traits/ WebformBrowserTestTrait.php, line 387
Class
- WebformBrowserTestTrait
- Provides convenience methods for webform assertions in browser tests.
Namespace
Drupal\Tests\webform\TraitsCode
protected function getExport(WebformInterface $webform, array $options = []) {
/** @var \Drupal\webform\WebformSubmissionExporterInterface $exporter */
$exporter = \Drupal::service('webform_submission.exporter');
$options += $exporter
->getDefaultExportOptions();
$this
->drupalGet('/admin/structure/webform/manage/' . $webform
->id() . '/results/download', [
'query' => $options,
]);
}