Migrated phpunit annotations to attributes

This commit is contained in:
Jan Böhmer 2025-07-14 00:32:06 +02:00
parent f1d34bbc24
commit dc480f755c
50 changed files with 171 additions and 246 deletions

View file

@ -22,6 +22,8 @@ declare(strict_types=1);
namespace App\Tests\Entity\UserSystem;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\RequiresPhpunit;
use App\Entity\UserSystem\User;
use App\Entity\UserSystem\WebauthnKey;
use Doctrine\Common\Collections\Collection;
@ -52,9 +54,7 @@ class UserTest extends TestCase
yield ['SSSk38498', true];
}
/**
* @dataProvider googleAuthenticatorEnabledDataProvider
*/
#[DataProvider('googleAuthenticatorEnabledDataProvider')]
public function testIsGoogleAuthenticatorEnabled(?string $secret, bool $expected): void
{
$user = new User();
@ -62,9 +62,7 @@ class UserTest extends TestCase
$this->assertSame($expected, $user->isGoogleAuthenticatorEnabled());
}
/**
* @requires PHPUnit 8
*/
#[RequiresPhpunit('8')]
public function testSetBackupCodes(): void
{
$user = new User();