Fix two bugs with caching of customized raw definitions.
[htmlpurifier.git] / tests / HTMLPurifier / URIFilter / DisableExternalTest.php
blob3176246a13bf1a1ae46f3b7f6021d79af6aaa8fe
1 <?php
3 class HTMLPurifier_URIFilter_DisableExternalTest extends HTMLPurifier_URIFilterHarness
6 function setUp() {
7 parent::setUp();
8 $this->filter = new HTMLPurifier_URIFilter_DisableExternal();
11 function testRemoveExternal() {
12 $this->assertFiltering(
13 'http://example.com', false
17 function testPreserveInternal() {
18 $this->assertFiltering(
19 '/foo/bar'
23 function testPreserveOurHost() {
24 $this->config->set('URI.Host', 'example.com');
25 $this->assertFiltering(
26 'http://example.com'
30 function testPreserveOurSubdomain() {
31 $this->config->set('URI.Host', 'example.com');
32 $this->assertFiltering(
33 'http://www.example.com'
37 function testRemoveSuperdomain() {
38 $this->config->set('URI.Host', 'www.example.com');
39 $this->assertFiltering(
40 'http://example.com', false
44 function testBaseAsHost() {
45 $this->config->set('URI.Base', 'http://www.example.com/foo/bar');
46 $this->assertFiltering(
47 'http://www.example.com/baz'
53 // vim: et sw=4 sts=4