mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-07 07:43:12 +08:00
Migrate from PHPUnit annotations to native attributes
This commit is contained in:
@@ -4,6 +4,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace ShlinkioTest\Shlink\Rest\Exception;
|
||||
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Shlinkio\Shlink\Rest\Exception\MissingAuthenticationException;
|
||||
|
||||
@@ -12,10 +14,7 @@ use function sprintf;
|
||||
|
||||
class MissingAuthenticationExceptionTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @test
|
||||
* @dataProvider provideExpectedHeaders
|
||||
*/
|
||||
#[Test, DataProvider('provideExpectedHeaders')]
|
||||
public function exceptionIsProperlyCreatedFromExpectedHeaders(array $expectedHeaders): void
|
||||
{
|
||||
$expectedMessage = sprintf(
|
||||
@@ -39,10 +38,7 @@ class MissingAuthenticationExceptionTest extends TestCase
|
||||
yield [['foo', 'bar', 'baz']];
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @dataProvider provideExpectedParam
|
||||
*/
|
||||
#[Test, DataProvider('provideExpectedParam')]
|
||||
public function exceptionIsProperlyCreatedFromExpectedQueryParam(string $param): void
|
||||
{
|
||||
$expectedMessage = sprintf('Expected authentication to be provided in "%s" query param', $param);
|
||||
|
||||
Reference in New Issue
Block a user