ipaddresses : invalid netmask2cidr mask was not correctely detected
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5988 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -355,13 +355,13 @@ class ipaddressesTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$i = new ipaddresses ();
|
||||
$res = $i->netmask2cidr ("127.0.0.0");
|
||||
$this->assertSame (7, $res);
|
||||
$this->assertSame (false, $res);
|
||||
}
|
||||
public function test_netmask2cidr7 ()
|
||||
{
|
||||
$i = new ipaddresses ();
|
||||
$res = $i->netmask2cidr ("63.0.0.0");
|
||||
$this->assertSame (6, $res);
|
||||
$this->assertSame (false, $res);
|
||||
}
|
||||
public function test_netmask2cidr8 ()
|
||||
{
|
||||
@@ -369,6 +369,12 @@ class ipaddressesTest extends PHPUnit_Framework_TestCase
|
||||
$res = $i->netmask2cidr ("155.0.0.0");
|
||||
$this->assertSame (false, $res);
|
||||
}
|
||||
public function test_netmask2cidr9 ()
|
||||
{
|
||||
$i = new ipaddresses ();
|
||||
$res = $i->netmask2cidr ("0.0.0.255");
|
||||
$this->assertSame (false, $res);
|
||||
}
|
||||
|
||||
public function test_netmask2cidrWildcard_1 ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user