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

+6 -11
View File
@@ -15,10 +15,12 @@ use App\Entity\Teamer;
use App\Entity\User;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Psr\Log\LoggerInterface;
#[AllowMockObjectsWithoutExpectations]
class UserDataHandlerTest extends TestCase
{
private EntityManagerInterface&MockObject $entityManager;
@@ -30,9 +32,7 @@ class UserDataHandlerTest extends TestCase
$this->logger = $this->createMock(LoggerInterface::class);
}
/**
* @dataProvider collectRolesProvider
*/
#[\PHPUnit\Framework\Attributes\DataProvider('collectRolesProvider')]
public function testCollectRolesImportsAdministrativeRolesAsPendingOnly(CrmAttributesResponse $crmAttributes, array $expectedRoles): void
{
$handler = new UserDataHandler($this->entityManager, $this->logger);
@@ -86,9 +86,8 @@ class UserDataHandlerTest extends TestCase
/**
* The role policy has to be identical whichever identity source claims the role, so
* toPendingRoles() must agree with collectPendingRoles() on equivalent input.
*
* @dataProvider toPendingRolesProvider
*/
#[\PHPUnit\Framework\Attributes\DataProvider('toPendingRolesProvider')]
public function testToPendingRolesMatchesTheCrmPolicy(array $claimedRoles, CrmAttributesResponse $crmAttributes, array $expectedRoles): void
{
$handler = new UserDataHandler($this->entityManager, $this->logger);
@@ -231,9 +230,7 @@ class UserDataHandlerTest extends TestCase
$this->assertSame('[email protected]', $teamer->getCommunication()?->getEmail());
}
/**
* @dataProvider pendingRolesProvider
*/
#[\PHPUnit\Framework\Attributes\DataProvider('pendingRolesProvider')]
public function testUpdateLocalUserRefreshesThePendingRoles(
array $roles,
array $claimedRoles,
@@ -441,9 +438,7 @@ class UserDataHandlerTest extends TestCase
$this->assertSame([User::PENDING_ROLES['ROLE_HOUSE_MANAGER']], $user->getPendingRoles());
}
/**
* @dataProvider unapprovableRoleProvider
*/
#[\PHPUnit\Framework\Attributes\DataProvider('unapprovableRoleProvider')]
public function testApproveRoleRefusesARoleWithoutANomination(array $roles, string $role): void
{
$user = (new User())