mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-25 10:20:18 -06:00
Add InvalidIpFormatExceptionTest
This commit is contained in:
parent
bab6a3951e
commit
f4a7712ded
19
module/Core/test/Exception/InvalidIpFormatExceptionTest.php
Normal file
19
module/Core/test/Exception/InvalidIpFormatExceptionTest.php
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace ShlinkioTest\Shlink\Core\Exception;
|
||||||
|
|
||||||
|
use PHPUnit\Framework\Attributes\Test;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
use Shlinkio\Shlink\Core\Exception\InvalidIpFormatException;
|
||||||
|
|
||||||
|
class InvalidIpFormatExceptionTest extends TestCase
|
||||||
|
{
|
||||||
|
#[Test]
|
||||||
|
public function fromInvalidIp(): void
|
||||||
|
{
|
||||||
|
$e = InvalidIpFormatException::fromInvalidIp('invalid');
|
||||||
|
self::assertEquals('Provided IP invalid does not have the right format. Expected X.X.X.X', $e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user