chore: upgrade phpunit to 12.5

This commit is contained in:
fromme committed 2026-10-01 10:07:05 +02:00
1 parent da039d0527
commit 849da8d471
53 files changed
+832 -856

No files matched your search

@@ -11,7 +11,7 @@ use App\Entity\Teamer;
use App\Repository\DispositionRepository;
use App\Service\Cron\DispositionStatusService;
use Doctrine\ORM\EntityManagerInterface;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\MockObject\Stub;
use PHPUnit\Framework\TestCase;
use Psr\Log\NullLogger;
@@ -24,14 +24,14 @@ use Psr\Log\NullLogger;
*/
class DispositionStatusServiceTest extends TestCase
{
private DispositionRepository&MockObject $repository;
private DispositionRepository&Stub $repository;
private DispositionStatusService $service;
protected function setUp(): void
{
$this->repository = $this->createMock(DispositionRepository::class);
$this->repository = $this->createStub(DispositionRepository::class);
$entityManager = $this->createMock(EntityManagerInterface::class);
$entityManager = $this->createStub(EntityManagerInterface::class);
$entityManager
->method('getRepository')
->willReturn($this->repository)
@@ -17,6 +17,7 @@ use App\Repository\SeasonAssignmentTaskRepository;
use App\Service\Cron\SeasonTaskReminderService;
use App\Service\Season\SeasonAssignmentLabeler;
use App\Service\Season\SeasonTaskDeadlineResolver;
use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Psr\Log\NullLogger;
@@ -26,6 +27,7 @@ use Psr\Log\NullLogger;
* anyone twice. That property, and what does and does not silence a reminder, is what is pinned
* here - the queries behind them are asserted in the repository test.
*/
#[AllowMockObjectsWithoutExpectations]
class SeasonTaskReminderServiceTest extends TestCase
{
private SeasonAssignmentTaskRepository&MockObject $repository;
@@ -14,6 +14,7 @@ use App\Entity\Embeddable\Communication;
use App\Entity\Teamer;
use App\Repository\DispositionRepository;
use App\Service\Cron\UploadReminderService;
use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Psr\Log\NullLogger;
@@ -25,6 +26,7 @@ use Psr\Log\NullLogger;
* arithmetic the service hands over, because a reminder that asks for the wrong day is just as
* silent as the broken queries these replaced.
*/
#[AllowMockObjectsWithoutExpectations]
class UploadReminderServiceTest extends TestCase
{
private const CONTRACT_DEADLINE_DAYS = 5;
@@ -11,6 +11,7 @@ use App\Entity\Teamer;
use App\Entity\TeamerWorkMonth;
use App\Repository\TeamerWorkMonthRepository;
use App\Service\Cron\WorkMonthReminderService;
use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Psr\Log\NullLogger;
@@ -19,6 +20,7 @@ use Psr\Log\NullLogger;
* Pins the rules the reminder applies: which day it runs on, how long it waits after an
* import, and who it can actually reach. The query itself is the repository's business.
*/
#[AllowMockObjectsWithoutExpectations]
class WorkMonthReminderServiceTest extends TestCase
{
private TeamerWorkMonthRepository&MockObject $repository;