本文整理匯總了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);
}