Prepared configs for API tests

This commit is contained in:
Alejandro Celaya
2019-01-26 10:19:20 +01:00
parent c4af1471f0
commit 22d61fead7
6 changed files with 90 additions and 1 deletions

View 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');
}
}