17 $this->assertEquals(array(
'U',
null), $node->getArguments(
'date', array(
'format' =>
'U',
'timestamp' =>
null)));
27 $node->getArguments(
'date', array(
'timestamp' => 123456,
'Y-m-d'));
37 $node->getArguments(
'date', array(
'Y-m-d',
'format' =>
'U'));
47 $node->getArguments(
'date', array(
'Y-m-d',
'timestamp' =>
null,
'unknown' =>
''));
57 $node->getArguments(
'date', array(
'Y-m-d',
'timestamp' =>
null,
'unknown1' =>
'',
'unknown2' =>
''));
67 $node->getArguments(
'substr_compare', array(
'abcd',
'bc',
'offset' => 1,
'case_sensitivity' =>
true));
74 $this->assertEquals(array(
'arg1'), $node->getArguments(array($this,
'customFunction'), array(
'arg1' =>
'arg1')));
80 $this->assertEquals(array(
'arg1'), $node->getArguments(__CLASS__.
'::customStaticFunction', array(
'arg1' =>
'arg1')));
90 $node->getArguments(array($this,
'customFunctionWithArbitraryArguments'), array());
112 $node->getArguments(
'custom_Twig_Tests_Node_Expression_CallTest_function', array());
130 return parent::getArguments($callable, $arguments);
custom_Twig_Tests_Node_Expression_CallTest_function($required)
An exception for terminatinating execution or to throw for unit testing.
customFunctionWithArbitraryArguments()
testResolveArgumentsWithMissingParameterForArbitraryArgumentsOnFunction()
@expectedException LogicException @expectedExceptionMessageRegExp #^The last parameter of "custom_Twi...
testResolveArgumentsWithMissingParameterForArbitraryArgumentsOnObject()
@expectedException LogicException @expectedExceptionMessageRegExp #^The last parameter of "CallableTe...
testResolveArgumentsWithMissingValueForOptionalArgument()
@expectedException Twig_Error_Syntax @expectedExceptionMessage Argument "case_sensitivity" could not ...
testResolveArgumentsWithMissingParameterForArbitraryArguments()
@expectedException LogicException @expectedExceptionMessage The last parameter of "Twig_Tests_Node_Ex...
static customStaticFunction($arg1, $arg2='default', $arg3=array())
testResolveArgumentsOnlyNecessaryArgumentsForCustomFunction()
testGetArgumentsForStaticMethod()
testGetArgumentsWithWrongNamedArgumentNames()
@expectedException Twig_Error_Syntax @expectedExceptionMessage Unknown arguments "unknown1",...
testGetArgumentsWhenPositionalArgumentsAfterNamedArguments()
@expectedException Twig_Error_Syntax @expectedExceptionMessage Positional arguments cannot be used af...
customFunction($arg1, $arg2='default', $arg3=array())
testGetArgumentsWhenArgumentIsDefinedTwice()
@expectedException Twig_Error_Syntax @expectedExceptionMessage Argument "format" is defined twice for...
testGetArgumentsWithWrongNamedArgumentName()
@expectedException Twig_Error_Syntax @expectedExceptionMessage Unknown argument "unknown" for functio...
getArguments($callable, $arguments)