mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-29 22:30:01 +02:00
Migrated phpunit annotations to attributes
This commit is contained in:
parent
f1d34bbc24
commit
dc480f755c
50 changed files with 171 additions and 246 deletions
|
@ -22,6 +22,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Tests\Services\UserSystem\TFA;
|
||||
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use App\Services\UserSystem\TFA\BackupCodeGenerator;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use RuntimeException;
|
||||
|
@ -54,9 +55,7 @@ class BackupCodeGeneratorTest extends TestCase
|
|||
yield [16];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider codeLengthDataProvider
|
||||
*/
|
||||
#[DataProvider('codeLengthDataProvider')]
|
||||
public function testGenerateSingleCode(int $code_length): void
|
||||
{
|
||||
$generator = new BackupCodeGenerator($code_length, 10);
|
||||
|
@ -70,9 +69,7 @@ class BackupCodeGeneratorTest extends TestCase
|
|||
yield [10];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider codeCountDataProvider
|
||||
*/
|
||||
#[DataProvider('codeCountDataProvider')]
|
||||
public function testGenerateCodeSet(int $code_count): void
|
||||
{
|
||||
$generator = new BackupCodeGenerator(8, $code_count);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue