function Main::testMailto in SpamSpan filter 5
File
- test/
spamspan_test.inc, line 113
Class
Code
function testMailto() {
$this
->assertEqual(spamspan_convertmailto("<a href='mailto:email@example.com'></a>"), "email@example.com");
$this
->assertEqual(spamspan_convertmailto("<a href='email@example.com'></a>"), "<a href='email@example.com'></a>");
$this
->assertEqual(spamspan_convertmailto("<a href='mailto:email@example.com'>some text</a>text"), "email@example.comtext");
$this
->assertEqual(spamspan_convertmailto("<a href='mailto:email@example.com'></a>"), "email@example.com");
$this
->assertEqual(spamspan_convertmailto("<a attribute='something' href='mailto:email@example.com' attribute='something'></a>"), "email@example.com");
$this
->assertEqual(spamspan_convertmailto('<a href="mailto:email@example.com">some text</a>'), "email@example.com");
// ignore parameters
$this
->assertEqual(spamspan_convertmailto('<a href="mailto:email@example.com">some text</a>'), "email@example.com");
// allow nested tags
$this
->assertEqual(spamspan_convertmailto('<a href="mailto:email@example.com"><em>some text</em></a>'), "email@example.com");
}