mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-16 12:26:30 +00:00
fixed some tests
This commit is contained in:
@@ -83,7 +83,7 @@ class Twig_Tests_Node_Expression_FilterTest extends Twig_Test_NodeTestCase
|
||||
$tests[] = array($node, 'twig_tests_filter_barbar($context, "abc")', $environment);
|
||||
|
||||
$node = $this->createFilter($string, 'barbar', array('foo' => new Twig_Node_Expression_Constant('bar', 1)));
|
||||
$tests[] = array($node, 'twig_tests_filter_barbar($context, "abc", null, null, ["foo" => "bar"])', $environment);
|
||||
$tests[] = array($node, 'twig_tests_filter_barbar($context, "abc", null, null, array("foo" => "bar"))', $environment);
|
||||
|
||||
$node = $this->createFilter($string, 'barbar', array('arg2' => new Twig_Node_Expression_Constant('bar', 1)));
|
||||
$tests[] = array($node, 'twig_tests_filter_barbar($context, "abc", null, "bar")', $environment);
|
||||
@@ -94,7 +94,7 @@ class Twig_Tests_Node_Expression_FilterTest extends Twig_Test_NodeTestCase
|
||||
new Twig_Node_Expression_Constant('3', 1),
|
||||
'foo' => new Twig_Node_Expression_Constant('bar', 1),
|
||||
));
|
||||
$tests[] = array($node, 'twig_tests_filter_barbar($context, "abc", "1", "2", [0 => "3", "foo" => "bar"])', $environment);
|
||||
$tests[] = array($node, 'twig_tests_filter_barbar($context, "abc", "1", "2", array(0 => "3", "foo" => "bar"))', $environment);
|
||||
|
||||
return $tests;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ class Twig_Tests_Node_Expression_FunctionTest extends Twig_Test_NodeTestCase
|
||||
$tests[] = array($node, 'twig_tests_function_barbar()', $environment);
|
||||
|
||||
$node = $this->createFunction('barbar', array('foo' => new Twig_Node_Expression_Constant('bar', 1)));
|
||||
$tests[] = array($node, 'twig_tests_function_barbar(null, null, ["foo" => "bar"])', $environment);
|
||||
$tests[] = array($node, 'twig_tests_function_barbar(null, null, array("foo" => "bar"))', $environment);
|
||||
|
||||
$node = $this->createFunction('barbar', array('arg2' => new Twig_Node_Expression_Constant('bar', 1)));
|
||||
$tests[] = array($node, 'twig_tests_function_barbar(null, "bar")', $environment);
|
||||
@@ -79,7 +79,7 @@ class Twig_Tests_Node_Expression_FunctionTest extends Twig_Test_NodeTestCase
|
||||
new Twig_Node_Expression_Constant('3', 1),
|
||||
'foo' => new Twig_Node_Expression_Constant('bar', 1),
|
||||
));
|
||||
$tests[] = array($node, 'twig_tests_function_barbar("1", "2", [0 => "3", "foo" => "bar"])', $environment);
|
||||
$tests[] = array($node, 'twig_tests_function_barbar("1", "2", array(0 => "3", "foo" => "bar"))', $environment);
|
||||
|
||||
// function as an anonymous function
|
||||
$node = $this->createFunction('anonymous', array(new Twig_Node_Expression_Constant('foo', 1)));
|
||||
|
||||
@@ -44,7 +44,7 @@ class Twig_Tests_Node_Expression_TestTest extends Twig_Test_NodeTestCase
|
||||
$tests[] = array($node, 'twig_tests_test_barbar("abc")', $environment);
|
||||
|
||||
$node = $this->createTest($string, 'barbar', array('foo' => new Twig_Node_Expression_Constant('bar', 1)));
|
||||
$tests[] = array($node, 'twig_tests_test_barbar("abc", null, null, ["foo" => "bar"])', $environment);
|
||||
$tests[] = array($node, 'twig_tests_test_barbar("abc", null, null, array("foo" => "bar"))', $environment);
|
||||
|
||||
$node = $this->createTest($string, 'barbar', array('arg2' => new Twig_Node_Expression_Constant('bar', 1)));
|
||||
$tests[] = array($node, 'twig_tests_test_barbar("abc", null, "bar")', $environment);
|
||||
@@ -55,7 +55,7 @@ class Twig_Tests_Node_Expression_TestTest extends Twig_Test_NodeTestCase
|
||||
new Twig_Node_Expression_Constant('3', 1),
|
||||
'foo' => new Twig_Node_Expression_Constant('bar', 1),
|
||||
));
|
||||
$tests[] = array($node, 'twig_tests_test_barbar("abc", "1", "2", [0 => "3", "foo" => "bar"])', $environment);
|
||||
$tests[] = array($node, 'twig_tests_test_barbar("abc", "1", "2", array(0 => "3", "foo" => "bar"))', $environment);
|
||||
|
||||
return $tests;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user