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