<?php
/**
* PHPTAL templating engine
*
* PHP Version 5
*
* @category HTML
* @package PHPTAL
* @author Laurent Bedubourg <hide@address.com>
* @author Kornel LesiÅski <hide@address.com>
* @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
* @version SVN: $Id: TalesPhpTest.php 888 2010-06-08 09:48:33Z kornel $
* @link http://phptal.org/
*/
class TalesPhpTest extends PHPTAL_TestCase {
function testMix()
{
$tpl = $this->newPHPTAL('input/php.html');
$tpl->real = 'real value';
$tpl->foo = 'real';
$res = normalize_html($tpl->execute());
$exp = normalize_html_file('output/php.html');
$this->assertEquals($exp, $res);
}
function testPHPAttribute()
{
$tpl = $this->newPHPTAL();
$tpl->setSource('<foo bar="<?php echo \'baz\' ; ?>"/>');
$this->assertEquals('<foo bar="baz"></foo>', $tpl->execute());
}
}