mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Allowed to set redirects for default domain via command line or API
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ShlinkioTest\Shlink\Core\Exception;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Shlinkio\Shlink\Core\Exception\InvalidDomainException;
|
||||
|
||||
class InvalidDomainExceptionTest extends TestCase
|
||||
{
|
||||
/** @test */
|
||||
public function configuresTheExceptionAsExpected(): void
|
||||
{
|
||||
$e = InvalidDomainException::forDefaultDomainRedirects();
|
||||
$expected = 'You cannot configure default domain\'s redirects this way. Use the configuration or env vars.';
|
||||
|
||||
self::assertEquals($expected, $e->getMessage());
|
||||
self::assertEquals($expected, $e->getDetail());
|
||||
self::assertEquals('Invalid domain', $e->getTitle());
|
||||
self::assertEquals('INVALID_DOMAIN', $e->getType());
|
||||
self::assertEquals(403, $e->getStatus());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user