mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-29 06:18:26 +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
|
@ -41,6 +41,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Tests\Services\LabelSystem;
|
||||
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use App\Entity\LabelSystem\LabelOptions;
|
||||
use App\Entity\LabelSystem\LabelProcessMode;
|
||||
use App\Entity\LabelSystem\LabelSupportedElement;
|
||||
|
@ -103,9 +104,7 @@ class SandboxedTwigFactoryTest extends WebTestCase
|
|||
yield ['{{ part.setCategory(null) }}'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider twigDataProvider
|
||||
*/
|
||||
#[DataProvider('twigDataProvider')]
|
||||
public function testTwigFeatures(string $twig): void
|
||||
{
|
||||
$options = new LabelOptions();
|
||||
|
@ -123,9 +122,7 @@ class SandboxedTwigFactoryTest extends WebTestCase
|
|||
$this->assertIsString($str);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider twigNotAllowedDataProvider
|
||||
*/
|
||||
#[DataProvider('twigNotAllowedDataProvider')]
|
||||
public function testTwigForbidden(string $twig): void
|
||||
{
|
||||
$this->expectException(SecurityError::class);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue