本文整理汇总了PHP中normalize_html_file函数的典型用法代码示例。如果您正苦于以下问题:PHP normalize_html_file函数的具体用法?PHP normalize_html_file怎么用?PHP normalize_html_file使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了normalize_html_file函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: testChain
function testChain()
{
$tpl = $this->newPHPTAL('input/tal-content.06.html');
$res = normalize_html($tpl->execute());
$exp = normalize_html_file('output/tal-content.06.html');
$this->assertEquals($exp, $res);
}
开发者ID:ShaeS,项目名称:Pine-Birch,代码行数:7,代码来源:TalContentTest.php
示例2: testIt
function testIt()
{
$tpl = $this->newPHPTAL('input/talesphpwithreplace.01.html');
$res = normalize_html($tpl->execute());
$exp = normalize_html_file('output/talesphpwithreplace.01.html');
$this->assertEquals($exp, $res);
}
开发者ID:gbisra,项目名称:Computer-r-us,代码行数:7,代码来源:TalesPhpWithReplaceTest.php
示例3: testDoesEscapeHTMLContent
function testDoesEscapeHTMLContent()
{
$tpl = $this->newPHPTAL('input/escape.html');
$exp = normalize_html_file('output/escape.html');
$res = normalize_html($tpl->execute());
$this->assertEquals($exp, $res);
}
开发者ID:gbisra,项目名称:Computer-r-us,代码行数:7,代码来源:EscapeHTMLTest.php
示例4: testWithCondition
function testWithCondition()
{
$tpl = $this->newPHPTAL('input/tal-omit-tag.02.html');
$res = normalize_html($tpl->execute());
$exp = normalize_html_file('output/tal-omit-tag.02.html');
$this->assertEquals($exp, $res);
}
开发者ID:ShaeS,项目名称:Pine-Birch,代码行数:7,代码来源:TalOmitTagTest.php
示例5: testInheritedMacroSlots
function testInheritedMacroSlots()
{
$tpl = $this->newPHPTAL('input/metal-macro.07.html');
$res = normalize_html($tpl->execute());
$exp = normalize_html_file('output/metal-macro.07.html');
$this->assertEquals($exp, $res);
}
开发者ID:gbisra,项目名称:Computer-r-us,代码行数:7,代码来源:MetalMacroTest.php
示例6: testMultilineInTemplate
function testMultilineInTemplate()
{
$tpl = $this->newPHPTAL('input/tal-comment.02.html');
$res = normalize_html($tpl->execute());
$exp = normalize_html_file('output/tal-comment.02.html');
$this->assertEquals($exp, $res);
}
开发者ID:gbisra,项目名称:Computer-r-us,代码行数:7,代码来源:TalCommentTest.php
示例7: testEscape
function testEscape()
{
$tpl = $this->newPHPTAL('input/tales-string-03.html');
$res = $tpl->execute();
$res = normalize_html($res);
$exp = normalize_html_file('output/tales-string-03.html');
$this->assertEquals($exp, $res);
}
开发者ID:ShaeS,项目名称:Pine-Birch,代码行数:8,代码来源:TalesStringTest.php
示例8: test
function test()
{
$tpl = $this->newPHPTAL('input/overloading-01.html');
$tpl->object = new OverloadTestClass();
$res = normalize_html($tpl->execute());
$exp = normalize_html_file('output/overloading-01.html');
$this->assertEquals($exp, $res);
}
开发者ID:gbisra,项目名称:Computer-r-us,代码行数:8,代码来源:OverloadingTest.php
示例9: testSimple
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);
}
开发者ID:gbisra,项目名称:Computer-r-us,代码行数:8,代码来源:ContentEncodingTest.php
示例10: testDtdInline
function testDtdInline()
{
$tpl = $this->newPHPTAL('input/doctype.04.html');
$res = $tpl->execute();
$res = normalize_html($res);
$exp = normalize_html_file('output/doctype.04.html');
$this->assertEquals($exp, $res);
}
开发者ID:ShaeS,项目名称:Pine-Birch,代码行数:8,代码来源:DoctypeTest.php
示例11: testInContent
function testInContent()
{
$tpl = $this->newPHPTAL('input/php-mode.02.xml');
$res = $tpl->execute();
$exp = normalize_html_file('output/php-mode.02.xml');
$res = normalize_html($res);
$this->assertEquals($exp, $res);
}
开发者ID:gbisra,项目名称:Computer-r-us,代码行数:8,代码来源:PhpModeTest.php
示例12: testTrue
function testTrue()
{
$tpl = $this->newPHPTAL('input/tales-true.html');
$tpl->isNotTrue = false;
$tpl->isTrue = true;
$res = $tpl->execute();
$this->assertEquals(normalize_html_file('output/tales-true.html'), normalize_html($res));
}
开发者ID:gbisra,项目名称:Computer-r-us,代码行数:8,代码来源:TalesTest.php
示例13: testExists
function testExists()
{
$tpl = $this->newPHPTAL('input/tal-condition.03.html');
$tpl->somevar = true;
$res = normalize_html($tpl->execute());
$exp = normalize_html_file('output/tal-condition.03.html');
$this->assertEquals($exp, $res);
}
开发者ID:ShaeS,项目名称:Pine-Birch,代码行数:8,代码来源:TalConditionTest.php
示例14: testExternalMacro
function testExternalMacro()
{
$filter = new OldMyPreFilter2();
$tpl = $this->newPHPTAL('input/prefilter.02.html');
$tpl->setPreFilter($filter);
$res = normalize_html($tpl->execute());
$exp = normalize_html_file('output/prefilter.02.html');
$this->assertEquals($exp, $res);
}
开发者ID:gbisra,项目名称:Computer-r-us,代码行数:9,代码来源:OldPreFilterTest.php
示例15: testMix
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);
}
开发者ID:ShaeS,项目名称:Pine-Birch,代码行数:9,代码来源:TalesPhpTest.php
示例16: testStripComments
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);
}
开发者ID:gbisra,项目名称:Computer-r-us,代码行数:9,代码来源:CommentFilterTest.php
示例17: testIt
function testIt()
{
$filter = new MyPostFilter();
$tpl = $this->newPHPTAL('input/postfilter.01.html');
$tpl->setPostFilter($filter);
$tpl->value = 'my value';
$res = normalize_html($tpl->execute());
$exp = normalize_html_file('output/postfilter.01.html');
$this->assertEquals($exp, $res);
}
开发者ID:ShaeS,项目名称:Pine-Birch,代码行数:10,代码来源:PostFilterTest.php
示例18: testEvalTranslate
function testEvalTranslate()
{
$tpl = $this->newPHPTAL('input/i18n-translate-02.html');
$tpl->setTranslator(new DummyTranslator());
$tpl->message = "my translate key &";
$res = $tpl->execute();
$res = normalize_html($res);
$exp = normalize_html_file('output/i18n-translate-02.html');
$this->assertEquals($exp, $res);
}
开发者ID:gbisra,项目名称:Computer-r-us,代码行数:10,代码来源:I18NTranslateTest.php
示例19: testAllowGtAndLtInTextNodes
public function testAllowGtAndLtInTextNodes()
{
$parser = new PHPTAL_Dom_SaxXmlParser('UTF-8');
$parser->parseFile($builder = new MyDocumentBuilder(), 'input/xml.03.xml')->getResult();
$this->assertEquals(normalize_html_file('output/xml.03.xml'), normalize_html($builder->result));
$this->assertEquals(3, $builder->elementStarts);
$this->assertEquals(3, $builder->elementCloses);
// a '<' character withing some text data make the parser call 2 times
// the onElementData() method
$this->assertEquals(7, $builder->datas);
}
开发者ID:ShaeS,项目名称:Pine-Birch,代码行数:11,代码来源:XmlParserTest.php
示例20: testReplaceStructure
function testReplaceStructure()
{
$tpl = $this->newPHPTAL('input/tal-on-error.03.html');
$tpl->dummy = new OnErrorDummyObject();
$res = normalize_html($tpl->execute());
$exp = normalize_html_file('output/tal-on-error.03.html');
$errors = $tpl->getErrors();
$this->assertEquals(1, count($errors));
$this->assertEquals('error thrown', $errors[0]->getMessage());
$this->assertEquals($exp, $res);
}
开发者ID:ShaeS,项目名称:Pine-Birch,代码行数:11,代码来源:TalOnErrorTest.php
注:本文中的normalize_html_file函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论