We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae3d5a9 commit c2d1030Copy full SHA for c2d1030
test/Faker/Provider/InternetTest.php
@@ -108,6 +108,16 @@ public function testIpv4()
108
$this->assertNotFalse(filter_var($this->faker->ipv4(), FILTER_VALIDATE_IP, FILTER_FLAG_IPV4));
109
}
110
111
+ public function testIpv4NotLocalNetwork()
112
+ {
113
+ $this->assertNotEquals('1.0.0.0', long2ip(ip2long($this->faker->ipv4()) & (-1 << (32 - 8))));
114
+ }
115
+
116
+ public function testIpv4NotBroadcast()
117
118
+ $this->assertNotEquals('255.255.255.255', $this->faker->ipv4());
119
120
121
public function testIpv6()
122
{
123
$this->assertNotFalse(filter_var($this->faker->ipv6(), FILTER_VALIDATE_IP, FILTER_FLAG_IPV6));
0 commit comments