3 class HTMLPurifier_URIFilter_DisableExternalTest
extends HTMLPurifier_URIFilterHarness
6 public function setUp()
9 $this->filter
= new HTMLPurifier_URIFilter_DisableExternal();
12 public function testRemoveExternal()
14 $this->assertFiltering(
15 'http://example.com', false
19 public function testPreserveInternal()
21 $this->assertFiltering(
26 public function testPreserveOurHost()
28 $this->config
->set('URI.Host', 'example.com');
29 $this->assertFiltering(
34 public function testPreserveOurSubdomain()
36 $this->config
->set('URI.Host', 'example.com');
37 $this->assertFiltering(
38 'http://www.example.com'
42 public function testRemoveSuperdomain()
44 $this->config
->set('URI.Host', 'www.example.com');
45 $this->assertFiltering(
46 'http://example.com', false
50 public function testBaseAsHost()
52 $this->config
->set('URI.Base', 'http://www.example.com/foo/bar');
53 $this->assertFiltering(
54 'http://www.example.com/baz'