aboutsummaryrefslogtreecommitdiffhomepage
path: root/services/app/src/Models/Testcase.php
blob: 68ee891075af75e0fd454d46fb5a7e1ec06e0170 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php

declare(strict_types=1);

namespace Nsfisis\Albatross\Models;

final class Testcase
{
    public function __construct(
        public readonly int $testcase_id,
        public readonly int $quiz_id,
        public readonly string $input,
        public readonly string $expected_result,
    ) {
    }

    public static function create(
        int $quiz_id,
        string $input,
        string $expected_result,
    ): self {
        return new self(
            testcase_id: 0,
            quiz_id: $quiz_id,
            input: $input,
            expected_result: $expected_result,
        );
    }
}