protected function SubmissionsCompletedSinceLastSuccessTest::assertSubmissionResults in Webform Scheduled Tasks 8.2
Assert the expected submissions in a schedule result set.
3 calls to SubmissionsCompletedSinceLastSuccessTest::assertSubmissionResults()
- SubmissionsCompletedSinceLastSuccessTest::testAllResultsAreIncludedForFailedTask in tests/
src/ Kernel/ SubmissionsCompletedSinceLastSuccessTest.php - @covers ::getResultSet
- SubmissionsCompletedSinceLastSuccessTest::testBasicIncrementalSubmissions in tests/
src/ Kernel/ SubmissionsCompletedSinceLastSuccessTest.php - @covers ::getResultSet
- SubmissionsCompletedSinceLastSuccessTest::testSubmissionCreationTimeScheduleRaceConditions in tests/
src/ Kernel/ SubmissionsCompletedSinceLastSuccessTest.php - @covers ::getResultSet
File
- tests/
src/ Kernel/ SubmissionsCompletedSinceLastSuccessTest.php, line 210
Class
- SubmissionsCompletedSinceLastSuccessTest
- Submissions since last success result set plugin test.
Namespace
Drupal\Tests\webform_scheduled_tasks\KernelCode
protected function assertSubmissionResults($expectedSubmissions) {
$this->schedule = WebformScheduledTask::load($this->schedule
->id());
$results = iterator_to_array($this->schedule
->getResultSetPlugin()
->getResultSet());
$entity_id = function (EntityInterface $entity) {
return $entity
->id();
};
$this
->assertEquals(array_map($entity_id, $expectedSubmissions), array_map($entity_id, $results));
}