PSR-2 reformatting PHPDoc corrections
[htmlpurifier.git] / tests / HTMLPurifier / URIFilter / DisableExternalTest.php
blobda6fe37ae1b8b4de112f9fd384510fc909b6e706
1 <?php
3 class HTMLPurifier_URIFilter_DisableExternalTest extends HTMLPurifier_URIFilterHarness
6 public function setUp()
8 parent::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(
22 '/foo/bar'
26 public function testPreserveOurHost()
28 $this->config->set('URI.Host', 'example.com');
29 $this->assertFiltering(
30 'http://example.com'
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'
60 // vim: et sw=4 sts=4