mirror of
https://github.com/shlinkio/shlink.git
synced 2024-12-23 15:40:33 -06:00
22 lines
515 B
PHP
22 lines
515 B
PHP
<?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, '/short-codes');
|
|
}
|
|
}
|