mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-24 03:49:31 +00: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\Attachments;
|
||||
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use App\Services\Formatters\AmountFormatter;
|
||||
use App\Services\Attachments\AttachmentPathResolver;
|
||||
use const DIRECTORY_SEPARATOR;
|
||||
|
|
@ -119,17 +120,13 @@ class AttachmentPathResolverTest extends WebTestCase
|
|||
yield ['/not/root'.$this->footprint_path, null];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider placeholderDataProvider
|
||||
*/
|
||||
#[DataProvider('placeholderDataProvider')]
|
||||
public function testPlaceholderToRealPath($param, $expected): void
|
||||
{
|
||||
$this->assertSame($expected, $this->service->placeholderToRealPath($param));
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider realPathDataProvider
|
||||
*/
|
||||
#[DataProvider('realPathDataProvider')]
|
||||
public function testRealPathToPlaceholder($param, $expected, $old_method = false): void
|
||||
{
|
||||
$this->assertSame($expected, $this->service->realPathToPlaceholder($param, $old_method));
|
||||
|
|
@ -154,9 +151,7 @@ class AttachmentPathResolverTest extends WebTestCase
|
|||
yield [$this->footprint_path . '/Passive/Capacitors/CAPACITOR_CTS_A_15MM.png', '%FOOTPRINTS%/Passive/Capacitors/CAPACITOR_CTS_A_15MM.png'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider germanFootprintPathdDataProvider
|
||||
*/
|
||||
#[DataProvider('germanFootprintPathdDataProvider')]
|
||||
public function testConversionOfGermanFootprintPaths(string $expected, string $input): void
|
||||
{
|
||||
$this->assertSame($expected, $this->service->placeholderToRealPath($input));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue