PEAR2_Templates_Savant-0.3.1PEAR2_Templates_Savant-0.3.1/test/pear2.php.net/PEAR2_Templates_Savant/escape/string.phpt

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--TEST--
\PEAR2\Templates\Savant\Main::render() string with addEscape() test
--FILE--
<?php
require dirname(__FILE__) . '/../test_framework.php.inc';
chdir(__DIR__);
$savant = new \PEAR2\Templates\Savant\Main();
$savant->setEscape('htmlspecialchars');

$string = 'test';
$test->assertEquals($string, $savant->escape($string), 'render');

$string = '<p></p>';
$test->assertEquals(htmlspecialchars($string), $savant->escape($string), 'render string with special chars');

?>
===DONE===
--EXPECT--
===DONE===
EOF