* @author Kornel LesiƄski * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License * @version SVN: $Id: ContentEncodingTest.php 958 2010-06-27 22:47:38Z kornel $ * @link http://phptal.org/ */ class ContentEncodingTest extends PHPTAL_TestCase { function testSimple() { $tpl = $this->newPHPTAL('input/content-encoding.xml'); $res = $tpl->execute(); $exp = normalize_html_file('output/content-encoding.xml'); $res = normalize_html($res); $this->assertEquals($exp, $res); } function testEchoArray() { $p = $this->newPHPTAL(); $p->setSource('

'); $p->foo = array('bar'=>'a&aa', '', null, -1); $this->assertEquals('

a&aa, <bbb>, , -1

', $p->execute()); } }