mirror of
https://github.com/shlinkio/shlink.git
synced 2024-12-23 15:40:33 -06:00
22 lines
630 B
PHP
22 lines
630 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace ShlinkioApiTest\Shlink\Rest\Action;
|
|
|
|
use Shlinkio\Shlink\Rest\Util\RestUtils;
|
|
use Shlinkio\Shlink\TestUtils\ApiTest\ApiTestCase;
|
|
|
|
class ResolveShortUrlActionTest extends ApiTestCase
|
|
{
|
|
/** @test */
|
|
public function tryingToResolveInvalidUrlReturnsNotFoundError(): void
|
|
{
|
|
$resp = $this->callApiWithKey(self::METHOD_GET, '/short-urls/invalid');
|
|
['error' => $error] = $this->getJsonResponsePayload($resp);
|
|
|
|
$this->assertEquals(self::STATUS_NOT_FOUND, $resp->getStatusCode());
|
|
$this->assertEquals(RestUtils::INVALID_ARGUMENT_ERROR, $error);
|
|
}
|
|
}
|