public function AccessFilterResrictionTestCase::testIpAddressMatching in Access Filter 7
Test IP address matching functions.
File
- ./
access_filter.test, line 118 - Tests for access_filter.module
Class
Code
public function testIpAddressMatching() {
$ip = '192.168.0.10';
$this
->assertIpAddressMatching('192.168.0.10', $ip);
$this
->assertIpAddressMatching('192.168.0.0-192.168.0.20', $ip);
$this
->assertIpAddressMatching('192.168.0.0/24', $ip);
$this
->assertIpAddressMatching('10.20.0.10', $ip, FALSE);
$this
->assertIpAddressMatching('10.20.0.0-10.20.0.20', $ip, FALSE);
$this
->assertIpAddressMatching('10.20.0.0/24', $ip, FALSE);
}