Do not duplicate nofollow attribute in transform.
[htmlpurifier.git] / tests / HTMLPurifier / HTMLModule / NofollowTest.php
blob43084de3afc66de27ac0b2b61d96309477660720
1 <?php
3 class HTMLPurifier_HTMLModule_NofollowTest extends HTMLPurifier_HTMLModuleHarness
6 function setUp() {
7 parent::setUp();
8 $this->config->set('HTML.Nofollow', true);
11 function testNofollow() {
12 $this->assertResult(
13 '<a href="http://google.com">a</a><a href="/local">b</a><a href="mailto:foo@example.com">c</a>',
14 '<a href="http://google.com" rel="nofollow">a</a><a href="/local">b</a><a href="mailto:foo@example.com">c</a>'
18 function testNofollowDupe() {
19 $this->assertResult(
20 '<a href="http://google.com" rel="nofollow">a</a><a href="/local">b</a><a href="mailto:foo@example.com">c</a>'
26 // vim: et sw=4 sts=4