PEAR2_Templates_Savant-0.2.0PEAR2_Templates_Savant-0.2.0/test/PEAR2_Templates_Savant/pear2.php.net/render/string.phpt

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
\PEAR2\Templates\Savant\Main::render() string 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->render($string), 'render');

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

$string = 'test';
$test->assertEquals($string, $savant->render($string, 'echostring.tpl.php'), 'render string through template');

$string = '<p></p>';
$test->assertEquals(htmlspecialchars($string), $savant->render($string, 'echostring.tpl.php'), 'render string with special chars through template');
?>
===DONE===
--EXPECT--
===DONE===
EOF