Allowed to set redirects for default domain via command line or API

This commit is contained in:
Alejandro Celaya
2021-12-07 21:13:47 +01:00
parent 5a56982ad9
commit 5e722c830f
6 changed files with 20 additions and 92 deletions

View File

@@ -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());
}
}