shlink/module/Rest/test-api/Middleware/AuthenticationTest.php

22 lines
515 B
PHP
Raw Normal View History

2019-01-26 03:19:20 -06:00
<?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);
2019-01-27 03:30:38 -06:00
$this->callApi(self::METHOD_GET, '/short-codes');
2019-01-26 03:19:20 -06:00
}
}