public function EmailedExportTest::testTaskWithEmptyResultSet in Webform Scheduled Tasks 8.2
Test the task with an empty result set.
File
- tests/
src/ Kernel/ EmailedExportTest.php, line 262
Class
- EmailedExportTest
- Test the email export plugin.
Namespace
Drupal\Tests\webform_scheduled_tasks\KernelCode
public function testTaskWithEmptyResultSet() {
$task = $this
->createTestTask([
'email_addresses' => 'foo@example.com, bar@example.com',
'storage_type' => EmailedExport::STORAGE_TYPE_FILESYSTEM,
'exporter' => 'json',
'exporter_settings' => [
'file_name' => 'submission-[webform_submission:serial]',
],
'delete_submissions' => TRUE,
'include_attachments' => FALSE,
]);
webform_scheduled_tasks_cron();
$this
->assertFalse($task
->isHalted());
$this
->assertCount(0, $this
->getMails());
}