Add vim modelines to all files.
[htmlpurifier.git] / tests / HTMLPurifier / AttrDef / URI / IPv4Test.php
blob0a4eb17ba359c20be598340d14f81ea86679ddce
1 <?php
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
9 function test() {
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
25 // vim: et sw=4 sts=4