diff --git a/tests/unit/e_parseTest.php b/tests/unit/e_parseTest.php index 2387b1afb..f7cdbc277 100644 --- a/tests/unit/e_parseTest.php +++ b/tests/unit/e_parseTest.php @@ -316,16 +316,31 @@ TMP; 'input' => array('Some long string & stuff'=> 0, 'other'=>null, 'extra'=>0.3, 'null'=>null), 'expected' => array('Some long string & stuff'=> 0, 'other'=>null, 'extra'=>0.3, 'null'=>null), ), - 18 => array( + /* 18 => array( 'input' => '">', 'expected' => '', 'mode' => 'model', 'parm' => array('type'=>'text', 'field'=>'news_title') - ) + ),*/ + 19 => array( // admin log simulation + 'input' => "Array[!br!]([!br!] [0] => zero[!br!] [1] => one[!br!] [2] => two[!br!])[!br!]", + 'expected' => "Array[!br!]([!br!] [0] => zero[!br!] [1] => one[!br!] [2] => two[!br!])[!br!]", + 'mode' => 'no_html', + ), + 20 => array( + 'input' => '\\', + 'expected' => '\', + 'mode' => 'no_html', + ), + 21 => array( + 'input' => 'Hello', + 'expected' => '<a href="">Hello</a>', + 'mode' => 'no_html', + ), ); - foreach($tests as $var) + foreach($tests as $k=>$var) { if(empty($var['input'])) { @@ -336,10 +351,9 @@ TMP; $parm = varset($var['parm']); $result = $this->tp->toDB($var['input'], false, false, $mode, $parm); - // $this->assertEquals($var['expected'], $result); - // FIXME: This test doesn't do anything? - } + $this->assertEquals($var['expected'], $result, 'Test #'.$k." failed."); + }