1<?php 2 3require_once DOKU_INC.'inc/init.php'; 4require_once DOKU_INC.'inc/common.php'; 5 6class common_obfuscate_test extends DokuWikiTest { 7 8 function test_none(){ 9 global $conf; 10 $conf['mailguard'] = 'none'; 11 $this->assertEquals(obfuscate('jon-doe@example.com'), 'jon-doe@example.com'); 12 } 13 14 function test_hex(){ 15 global $conf; 16 $conf['mailguard'] = 'hex'; 17 $this->assertEquals(obfuscate('jon-doe@example.com'), 18 'jon-doe@example.com'); 19 } 20 21 function test_visible(){ 22 global $conf; 23 $conf['mailguard'] = 'visible'; 24 $this->assertEquals(obfuscate('jon-doe@example.com'), 'jon [dash] doe [at] example [dot] com'); 25 } 26 27 28} 29//Setup VIM: ex: et ts=4 : 30