blob: d7c947117b03f7830c57f4426e26b874f7ae635c (
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
29
|
<?php
require_once DOKU_INC.'inc/init.php';
require_once DOKU_INC.'inc/common.php';
class common_obfuscate_test extends PHPUnit_Framework_TestCase {
function test_none(){
global $conf;
$conf['mailguard'] = 'none';
$this->assertEquals(obfuscate('jon-doe@example.com'), 'jon-doe@example.com');
}
function test_hex(){
global $conf;
$conf['mailguard'] = 'hex';
$this->assertEquals(obfuscate('jon-doe@example.com'),
'jon-doe@example.com');
}
function test_visible(){
global $conf;
$conf['mailguard'] = 'visible';
$this->assertEquals(obfuscate('jon-doe@example.com'), 'jon [dash] doe [at] example [dot] com');
}
}
//Setup VIM: ex: et ts=4 :
|