Files
shlink/module/Core/test/Exception/InvalidShortCodeExceptionTest.php
T

20 lines
496 B
PHP
Raw Normal View History

2018-11-17 19:23:25 +01:00
<?php
2019-10-05 17:26:10 +02:00
2018-11-17 19:23:25 +01:00
declare(strict_types=1);
namespace ShlinkioTest\Shlink\Core\Exception;
use PHPUnit\Framework\TestCase;
use Shlinkio\Shlink\Core\Exception\ShortUrlNotFoundException;
2018-11-17 19:23:25 +01:00
class InvalidShortCodeExceptionTest extends TestCase
{
2019-02-17 20:28:34 +01:00
/** @test */
public function properlyCreatesExceptionFromNotFoundShortCode(): void
2018-11-17 19:23:25 +01:00
{
$e = ShortUrlNotFoundException::fromNotFoundShortCode('abc123');
2018-11-17 19:23:25 +01:00
$this->assertEquals('No URL found for short code "abc123"', $e->getMessage());
2018-11-17 19:23:25 +01:00
}
}