Replace DocBlocks tests markup with phpunit v11 attributes

This commit is contained in:
Bubka
2024-06-26 14:29:13 +02:00
parent cced8dbaff
commit 1a752d1243
78 changed files with 624 additions and 1681 deletions

View File

@@ -17,6 +17,7 @@ use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Test;
use Tests\TestCase;
/**
@@ -25,9 +26,7 @@ use Tests\TestCase;
#[CoversClass(Handler::class)]
class HandlerTest extends TestCase
{
/**
* @test
*/
#[Test]
#[DataProvider('provideExceptionsforBadRequest')]
public function test_exceptions_returns_badRequest_json_response($exception)
{
@@ -85,9 +84,7 @@ class HandlerTest extends TestCase
];
}
/**
* @test
*/
#[Test]
#[DataProvider('provideExceptionsforNotFound')]
public function test_exceptions_returns_notFound_json_response($exception)
{
@@ -124,9 +121,7 @@ class HandlerTest extends TestCase
];
}
/**
* @test
*/
#[Test]
public function test_authenticationException_returns_unauthorized_json_response()
{
$request = $this->createMock(Request::class);
@@ -150,9 +145,7 @@ class HandlerTest extends TestCase
]);
}
/**
* @test
*/
#[Test]
public function test_authenticationException_returns_proxyAuthRequired_json_response_with_proxy_guard()
{
$request = $this->createMock(Request::class);
@@ -176,9 +169,7 @@ class HandlerTest extends TestCase
]);
}
/**
* @test
*/
#[Test]
public function test_AccessDeniedException_returns_forbidden_json_response()
{
$request = $this->createMock(Request::class);