shlink/module/Core/test/Exception/InvalidIpFormatExceptionTest.php

20 lines
518 B
PHP
Raw Normal View History

2024-07-17 12:59:13 -05:00
<?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());
}
}