enhanced submission handling with deccision trees
Some checks failed
PHPUnit / test (push) Has been cancelled

This commit is contained in:
2026-06-05 11:57:28 +02:00
parent 6883654d7c
commit c37940c9a9
4 changed files with 157 additions and 13 deletions

View File

@ -30,6 +30,15 @@ final class AppAnswersTest extends TestCase
$this->assertSame(['one', 'two'], qdb_decode_multi_check_values('one, two'));
}
public function testBuildGlassSymptomJsonOmitsEmptyAndReturnsNullForNoSymptoms(): void
{
require_once dirname(__DIR__, 2) . '/lib/app_answers.php';
$this->assertNull(qdb_build_glass_symptom_json([]));
$this->assertNull(qdb_build_glass_symptom_json(['pain' => '']));
$json = qdb_build_glass_symptom_json(['pain' => 'mild', 'fatigue' => 'severe']);
$this->assertSame(['pain' => 'mild', 'fatigue' => 'severe'], json_decode((string)$json, true));
}
public function testGroupAppSubmitAnswersMergesMultiCheck(): void
{
$answers = [