Fix two minor bugs, updating Phorum and removing unused $dir variable.
[htmlpurifier/darkodev.git] / tests / HTMLPurifier / Injector / LinkifyTest.php
blobe66f0eb95c0d5ffc20eca5d0322fe86e264d97f2
1 <?php
3 class HTMLPurifier_Injector_LinkifyTest extends HTMLPurifier_InjectorHarness
6 function setup() {
7 parent::setup();
8 $this->config->set('AutoFormat.Linkify', true);
11 function testLinkifyURLInRootNode() {
12 $this->assertResult(
13 'http://example.com',
14 '<a href="http://example.com">http://example.com</a>'
18 function testLinkifyURLInInlineNode() {
19 $this->assertResult(
20 '<b>http://example.com</b>',
21 '<b><a href="http://example.com">http://example.com</a></b>'
25 function testBasicUsageCase() {
26 $this->assertResult(
27 'This URL http://example.com is what you need',
28 'This URL <a href="http://example.com">http://example.com</a> is what you need'
32 function testIgnoreURLInATag() {
33 $this->assertResult(
34 '<a>http://example.com/</a>'
38 function testNeeded() {
39 $this->config->set('HTML.Allowed', 'b');
40 $this->expectError('Cannot enable Linkify injector because a is not allowed');
41 $this->assertResult('http://example.com/');
46 // vim: et sw=4 sts=4