mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Prepared configs for API tests
This commit is contained in:
21
module/Rest/test-api/Middleware/AuthenticationTest.php
Normal file
21
module/Rest/test-api/Middleware/AuthenticationTest.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ShlinkioApiTest\Shlink\Rest\Middleware;
|
||||
|
||||
use GuzzleHttp\Exception\ClientException;
|
||||
use ShlinkioTest\Shlink\Common\ApiTest\ApiTestCase;
|
||||
|
||||
class AuthenticationTest extends ApiTestCase
|
||||
{
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function unauthorizedIsReturnedIfNoAuthenticationIsSent()
|
||||
{
|
||||
$this->expectException(ClientException::class);
|
||||
$this->expectExceptionCode(self::STATUS_UNAUTHORIZED);
|
||||
|
||||
$this->callApi(self::METHOD_GET, '/rest/v1/short-codes');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user