first test suite retrieval
This commit is contained in:
37
src/Eval/Dto/EvalResult.php
Normal file
37
src/Eval/Dto/EvalResult.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Eval\Dto;
|
||||
|
||||
final readonly class EvalResult
|
||||
{
|
||||
/**
|
||||
* @param array<int, string> $failures
|
||||
* @param array<string, mixed> $details
|
||||
*/
|
||||
public function __construct(
|
||||
public string $caseId,
|
||||
public string $type,
|
||||
public bool $passed,
|
||||
public float $durationMs,
|
||||
public array $failures = [],
|
||||
public array $details = [],
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function toArray(): array
|
||||
{
|
||||
return [
|
||||
'case_id' => $this->caseId,
|
||||
'type' => $this->type,
|
||||
'passed' => $this->passed,
|
||||
'duration_ms' => $this->durationMs,
|
||||
'failures' => $this->failures,
|
||||
'details' => $this->details,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user