Refactored constraints, to reuse existing mechanisms

This commit is contained in:
Jan Böhmer 2025-09-21 20:45:18 +02:00
parent 702e5c8732
commit 0d49632b92
26 changed files with 264 additions and 542 deletions

View file

@ -22,7 +22,7 @@ declare(strict_types=1);
namespace App\Tests\Entity;
use App\Entity\BulkImportJobStatus;
use App\Entity\InfoProviderSystem\BulkImportJobStatus;
use PHPUnit\Framework\TestCase;
class BulkImportJobStatusTest extends TestCase
@ -39,7 +39,7 @@ class BulkImportJobStatusTest extends TestCase
public function testEnumCases(): void
{
$cases = BulkImportJobStatus::cases();
$this->assertCount(5, $cases);
$this->assertContains(BulkImportJobStatus::PENDING, $cases);
$this->assertContains(BulkImportJobStatus::IN_PROGRESS, $cases);
@ -68,4 +68,4 @@ class BulkImportJobStatusTest extends TestCase
$this->expectException(\ValueError::class);
BulkImportJobStatus::from('invalid');
}
}
}