Custom Injector to display URL address along with link text.
[htmlpurifier.git] / tests / HTMLPurifier / Injector / DisplayLinkURITest.php
blobe2f8e75aa7ef80f7a4ac4f258dec9f0735f1887a
1 <?php
3 class HTMLPurifier_Injector_DisplayLinkURITest extends HTMLPurifier_InjectorHarness
6 function setup() {
7 parent::setup();
8 $this->config->set('AutoFormat', 'DisplayLinkURI', true);
11 function testBasicLink() {
12 $this->assertResult(
13 '<a href="http://malware.example.com">Don\'t go here!</a>',
14 '<a>Don\'t go here!</a> (http://malware.example.com)'
18 function testEmptyLink() {
19 $this->assertResult(
20 '<a>Don\'t go here!</a>',
21 '<a>Don\'t go here!</a>'
24 function testEmptyText() {
25 $this->assertResult(
26 '<a href="http://malware.example.com"></a>',
27 '<a></a> (http://malware.example.com)'