* @author Kornel LesiƄski * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License * @version SVN: $Id: CommentFilterTest.php 888 2010-06-08 09:48:33Z kornel $ * @link http://phptal.org/ */ class CommentFilterTest extends PHPTAL_TestCase { function testStripComments() { $t = $this->newPHPTAL('input/comment-filter-01.html'); $t->addPreFilter(new PHPTAL_PreFilter_StripComments()); $res = $t->execute(); $res = normalize_html($res); $exp = normalize_html_file('output/comment-filter-01.html'); $this->assertEquals($exp, $res); } function testPreservesScript() { $t = $this->newPHPTAL(); $t->addPreFilter(new PHPTAL_PreFilter_StripComments()); $t->setSource(''); $this->assertEquals(normalize_html(''), normalize_html($t->execute())); } function testNamespaceAware() { $t = $this->newPHPTAL(); $t->addPreFilter(new PHPTAL_PreFilter_StripComments()); $t->setSource(''); $this->assertEquals(normalize_html(''), normalize_html($t->execute())); } }