Skip to content

Commit

Permalink
test: ✅ Adding tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sirmerdas committed May 23, 2024
1 parent 729eef0 commit 291f90f
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/IpToolTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

use PHPUnit\Framework\TestCase;
use Sirmerdas\IpHelper\IpTools;

class IpToolTest extends TestCase
{

public function test_verifyIpV4()
{
$this->assertTrue(IpTools::verifyIpV4("127.0.0.1"));
}

public function test_verifyIpV6()
{
$this->assertTrue(IpTools::verifyIpV6("::1"));
}


public function test_fakeIpV4()
{
$this->assertTrue(IpTools::verifyIpV4(IpTools::fakeIpV4()));
}

public function test_fakeIpV6()
{
$this->assertTrue(IpTools::verifyIpV6(IpTools::fakeIpV6()));
}
}

0 comments on commit 291f90f

Please sign in to comment.