mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-08 23:08:42 +00:00
6232221c08
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@160 48356398-32a2-884e-a903-53898d9a118a
22 lines
597 B
PHP
22 lines
597 B
PHP
<?php
|
|
|
|
require_once 'HTMLPurifier/AttrDef.php';
|
|
|
|
class HTMLPurifier_AttrDefTest extends UnitTestCase
|
|
{
|
|
|
|
function test_parseCDATA() {
|
|
|
|
$def = new HTMLPurifier_AttrDef();
|
|
|
|
$this->assertEqual('', $def->parseCDATA(''));
|
|
$this->assertEqual('', $def->parseCDATA("\t\n\r \t\t"));
|
|
$this->assertEqual('foo', $def->parseCDATA("\t\n\r foo\t\t"));
|
|
$this->assertEqual('ignorelinefeeds', $def->parseCDATA("ignore\nline\nfeeds"));
|
|
$this->assertEqual('translate to space', $def->parseCDATA("translate\rto\tspace"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|