protected function TaskRunnerTest::createTestTask in Webform Scheduled Tasks 8.2
Create a test task.
Return value
\Drupal\webform_scheduled_tasks\Entity\WebformScheduledTaskInterface The scheduled task.
1 call to TaskRunnerTest::createTestTask()
- TaskRunnerTest::testGetPendingTasks in tests/
src/ Kernel/ TaskRunnerTest.php - @covers ::getPendingTasks
File
- tests/
src/ Kernel/ TaskRunnerTest.php, line 117
Class
- TaskRunnerTest
- @coversDefaultClass \Drupal\webform_scheduled_tasks\TaskRunner @group webform_scheduled_tasks
Namespace
Drupal\Tests\webform_scheduled_tasks\KernelCode
protected function createTestTask($values = []) {
$schedule = WebformScheduledTask::create($values + [
'id' => strtolower($this
->randomMachineName()),
'webform' => $this->testWebform
->id(),
'result_set_type' => 'all_submissions',
'task_type' => 'test_task',
]);
$schedule
->save();
return $schedule;
}