3 // IPv4 test case is spliced from Feyd's IPv6 implementation
4 // we ought to disallow non-routable addresses
6 class HTMLPurifier_AttrDef_URI_IPv4Test
extends HTMLPurifier_AttrDefHarness
11 $this->def
= new HTMLPurifier_AttrDef_URI_IPv4();
13 $this->assertDef('127.0.0.1'); // standard IPv4, loopback, non-routable
14 $this->assertDef('0.0.0.0'); // standard IPv4, unspecified, non-routable
15 $this->assertDef('255.255.255.255'); // standard IPv4
17 $this->assertDef('300.0.0.0', false); // standard IPv4, out of range
18 $this->assertDef('124.15.6.89/60', false); // standard IPv4, prefix not allowed
20 $this->assertDef('', false); // nothing