23 lines
515 B
PHP
23 lines
515 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\Integration;
|
|
|
|
use Tests\Support\QdbTestCase;
|
|
|
|
final class ApiRoutingTest extends QdbTestCase
|
|
{
|
|
public function testUnknownRoute404(): void
|
|
{
|
|
$res = $this->api()->request('GET', 'does-not-exist');
|
|
$this->assertApiError($res, 'NOT_FOUND', 404);
|
|
}
|
|
|
|
public function testUnauthorizedWithoutToken(): void
|
|
{
|
|
$res = $this->api()->request('GET', 'questionnaires');
|
|
$this->assertApiError($res, 'UNAUTHORIZED', 401);
|
|
}
|
|
}
|