PEAR2_Templates_Savant-0.3.0 › PEAR2_Templates_Savant-0.3.0/test/pear2.php.net/PEAR2_Templates_Savant/render/object.phpt
- PEAR2_Templates_Savant-0.3.0/
- doc/
- pear2.php.net/
- PEAR2_Templates_Savant/
- examples/
- baseball/
- examples/
- templates/
- examples/
- examples/
- PEAR2_Templates_Savant/
- pear2.php.net/
- php/
- PEAR2/
- Autoload.php
- Exception.php
- MultiErrors/
- MultiErrors.php
- Templates/
- PEAR2/
- test/
- pear2.php.net/
- doc/
- package.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--TEST--
\PEAR2\Templates\Savant\Main::render() object test
--FILE--
<?php
require dirname(__FILE__) . '/../test_framework.php.inc';
chdir(__DIR__);
$savant = new \PEAR2\Templates\Savant\Main();
class Foo
{
public $var1;
function __toString()
{
return 'test';
}
}
$object = new Foo();
$object->var1 = ' is my class';
$savant->setEscape();
$test->assertEquals('Foo is my class', $savant->render($object), 'render object');
$test->assertEquals('test', $savant->render($object, 'echostring.tpl.php'), 'render object with custom template');
?>
===DONE===
--EXPECT--
===DONE===EOF
