mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-18 17:38:20 +02:00
Replace DocBlocks tests markup with phpunit v11 attributes
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user