setBlockedSubnets() public method

Method to set the block subnets
public setBlockedSubnets ( string | array $subnets = null ) : Auth
$subnets string | array
return Auth
示例#1
0
 public function testSetBlockedSubnets()
 {
     $a = new Auth(new File(__DIR__ . '/../tmp/access.txt'));
     $a->setBlockedSubnets(array('123.123.123', '124.124.124'));
     $this->assertEquals(array('123.123.123', '124.124.124'), $a->getValidator('blockedSubnets')->getValue());
     $a->setBlockedSubnets();
     $this->assertEquals(null, $a->getValidator('blockedSubnets'));
 }