blob: 3e1e1a72f49841cbc3e4ce8f44323e9fd82933f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<?php
require_once DOKU_INC.'inc/common.php';
class common_obfuscate_test extends UnitTestCase {
function test_none(){
global $conf;
$conf['mailguard'] = 'none';
$this->assertEqual(obfuscate('jon-doe@example.com'), 'jon-doe@example.com');
}
function test_hex(){
global $conf;
$conf['mailguard'] = 'hex';
$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 :
|