fix: offer the questionnaire after every placement, the bus part to escorts

This commit is contained in:
fromme committed 2026-10-27 17:12:24 +01:00
1 parent 9fedc5b5d3
commit 2f4f9800dd
30 files changed
+311 -77

No files matched your search

+11 -1
View File
@@ -179,6 +179,17 @@ class DispositionVoterTest extends TestCase
$this->assertQuestionnaire(true, $this->escortDisposition());
}
/**
* Every placement gets the questionnaire; the escort only adds the bus sections.
*/
public function testTheTeamerMayFillInTheQuestionnaireWithoutAnEscortToo(): void
{
$disposition = $this->escortDisposition();
$disposition->getAssignment()->setPickup(0);
$this->assertQuestionnaire(true, $disposition);
}
/**
* Ending today already counts as over, as in DispositionRepository's feedback queries.
*/
@@ -205,7 +216,6 @@ class DispositionVoterTest extends TestCase
public static function questionnaireDenials(): array
{
return [
'no bus escort' => [static fn (Disposition $d) => $d->getAssignment()->setPickup(0)],
'assignment not over yet' => [static fn (Disposition $d) => $d->getAssignment()->getDestination()->setDateTo(new \DateTimeImmutable('tomorrow'))],
'ended before go-live' => [static fn (Disposition $d) => $d->getAssignment()->getDestination()->setDateTo(new \DateTimeImmutable('2025-12-31'))],
'skip formalities' => [static fn (Disposition $d) => $d->getAssignment()->setSkipFormalities(true)],