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

@@ -6,6 +6,8 @@ namespace ShlinkioApiTest\Shlink\Rest\Action;
use Cake\Chronos\Chronos;
use GuzzleHttp\RequestOptions;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Test;
use Shlinkio\Shlink\TestUtils\ApiTest\ApiTestCase;
use ShlinkioApiTest\Shlink\Rest\Utils\NotFoundUrlHelpersTrait;
@@ -15,10 +17,7 @@ class ResolveShortUrlTest extends ApiTestCase
{
use NotFoundUrlHelpersTrait;
/**
* @test
* @dataProvider provideDisabledMeta
*/
#[Test, DataProvider('provideDisabledMeta')]
public function shortUrlIsProperlyResolvedEvenWhenNotEnabled(array $disabledMeta): void
{
$shortCode = 'abc123';
@@ -43,10 +42,7 @@ class ResolveShortUrlTest extends ApiTestCase
yield 'maxVisits reached' => [['maxVisits' => 1]];
}
/**
* @test
* @dataProvider provideInvalidUrls
*/
#[Test, DataProvider('provideInvalidUrls')]
public function tryingToResolveInvalidUrlReturnsNotFoundError(
string $shortCode,
?string $domain,