本文整理汇总了PHP中Twig_Test_NodeTestCase::testCompile方法的典型用法代码示例。如果您正苦于以下问题:PHP Twig_Test_NodeTestCase::testCompile方法的具体用法?PHP Twig_Test_NodeTestCase::testCompile怎么用?PHP Twig_Test_NodeTestCase::testCompile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Twig_Test_NodeTestCase
的用法示例。
在下文中一共展示了Twig_Test_NodeTestCase::testCompile方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testCompile
/**
* @covers Twig_Node_Expression_Filter::compile
* @dataProvider getTests
*/
public function testCompile($node, $source, $environment = null)
{
parent::testCompile($node, $source, $environment);
$expr = new Twig_Node_Expression_Constant('foo', 0);
$node = $this->createFilter($expr, 'foobar', array(new Twig_Node_Expression_Constant('bar', 0), new Twig_Node_Expression_Constant('foobar', 0)));
try {
$node->compile($this->getCompiler());
$this->fail();
} catch (Exception $e) {
$this->assertEquals('Twig_Error_Syntax', get_class($e));
}
}
示例2: testCompile
/**
* @covers Twig_Node_Expression_Test::compile
* @dataProvider getTests
*/
public function testCompile($node, $source, $environment = null)
{
parent::testCompile($node, $source, $environment);
}
示例3: testCompile
/**
* @covers Twig_Node_Block::compile
* @dataProvider getTests
*/
public function testCompile($node, $source, $environment = null, $isPattern = false)
{
parent::testCompile($node, $source, $environment, $isPattern);
}