From 776b36ecb82abfa13cfae70762b30c5f81499555 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 22 Oct 2005 00:34:34 +0200 Subject: fix for double encoding when using mailguard darcs-hash:20051021223434-7ad00-b6364357c2cc0af50bfdd1490debbb198d3ee5a6.gz --- _test/cases/inc/common_obfuscate.test.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 _test/cases/inc/common_obfuscate.test.php (limited to '_test') diff --git a/_test/cases/inc/common_obfuscate.test.php b/_test/cases/inc/common_obfuscate.test.php new file mode 100644 index 000000000..60042ac19 --- /dev/null +++ b/_test/cases/inc/common_obfuscate.test.php @@ -0,0 +1,29 @@ +assertEqual(obfuscate('jon-doe@example.com'), 'jon-doe@example.com'); + } + + function test_hex(){ + global $conf; + $conf['mailguard'] = 'hex'; +print obfuscate('andi@foobar.com'); + $this->assertEqual(obfuscate('jon-doe@example.com'), + 'jon-doe@example.com'); + } + + function test_visible(){ + global $conf; + $conf['mailguard'] = 'visible'; + $this->assertEqual(obfuscate('jon-doe@example.com'), 'jon [dash] doe [at] example [dot] com'); + } + + +} +//Setup VIM: ex: et ts=4 enc=utf-8 : -- cgit v1.2.3