Migrate from PHPUnit annotations to native attributes

This commit is contained in:
Alejandro Celaya
2023-02-09 20:42:18 +01:00
parent 650a286982
commit 04bbd471ff
188 changed files with 776 additions and 1082 deletions

View File

@@ -5,6 +5,8 @@ declare(strict_types=1);
namespace ShlinkioTest\Shlink\Core\Functions;
use BackedEnum;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase;
use Shlinkio\Shlink\Core\Config\EnvVars;
use Shlinkio\Shlink\Core\Model\DeviceType;
@@ -18,9 +20,8 @@ class FunctionsTest extends TestCase
{
/**
* @param class-string<BackedEnum> $enum
* @test
* @dataProvider provideEnums
*/
#[Test, DataProvider('provideEnums')]
public function enumValuesReturnsExpectedValueForEnum(string $enum, array $expectedValues): void
{
self::assertEquals($expectedValues, enumValues($enum));