mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-17 07:49:54 +03:00
Add InvalidIpFormatExceptionTest
This commit is contained in:
parent
bab6a3951e
commit
f4a7712ded
1 changed files with 19 additions and 0 deletions
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…
Add table
Reference in a new issue