PEAR2_Templates_Savant-0.3.2PEAR2_Templates_Savant-0.3.2/test/pear2.php.net/PEAR2_Templates_Savant/globals/escape.phpt

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
\PEAR2\Templates\Savant\Main::addGlobal() Escape added globals test
--FILE--
<?php
require dirname(__FILE__) . '/../test_framework.php.inc';
chdir(__DIR__);
$savvy = new \PEAR2\Templates\Savant\Main();

function myEscape($var)
{
    echo '===DONE===';
    return $var;
}

$savvy->setEscape('myEscape');

$savvy->addGlobal('foo', 'lalalala');

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