feat: offer the questionnaire for placements ended within a rolling window
This commit is contained in:
1 parent
9d0cdd7f52
commit
3c34cfa76a
8 files changed
+65
-55
No files matched your search
@@ -112,6 +112,18 @@ class QuestionnaireCatalogTest extends TestCase
|
||||
$this->assertSame('Alte Frage', $catalog->get('sample', 1)->getQuestion('answer')->label);
|
||||
}
|
||||
|
||||
public function testTheWindowStartsTheGivenDaysBeforeToday(): void
|
||||
{
|
||||
$this->assertEquals(new \DateTimeImmutable('today -2 days'), QuestionnaireCatalog::windowStart(2));
|
||||
}
|
||||
|
||||
public function testANegativeWindowFailsLoudly(): void
|
||||
{
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
|
||||
QuestionnaireCatalog::windowStart(-1);
|
||||
}
|
||||
|
||||
public function testUnknownQuestionnaireIsRejected(): void
|
||||
{
|
||||
$this->expectException(\InvalidArgumentException::class);
|
||||
|
||||
Reference in new issue
Block a user