As now, encodeHTML() can process a normal array

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8874 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
taggon 2011-08-25 02:24:17 +00:00
parent 1975acc8ad
commit 1d27b6ae7a
2 changed files with 21 additions and 9 deletions

View file

@ -108,6 +108,15 @@ class SecurityTest extends PHPUnit_Framework_TestCase
$this->assertEquals(Context::get('object1'), $obj);
}
public function testEncodeHTML_CustomContext()
{
$array = array('Hello', 'World', '<b>Bold</b> is not bald');
// array with no nested objects or arrays
$security = new Security($array);
$returned = $security->encodeHTML('.');
$this->assertEquals($returned, array('Hello', 'World', '&lt;b&gt;Bold&lt;/b&gt; is not bald'));
}
}
$mock_vars = array();