Definition at line 12 of file TestTest.php.
◆ createTest()
Twig_Tests_Node_Expression_TestTest::createTest |
( |
|
$node, |
|
|
|
$name, |
|
|
array |
$arguments = array() |
|
) |
| |
|
protected |
◆ getEnvironment()
Twig_Tests_Node_Expression_TestTest::getEnvironment |
( |
| ) |
|
|
protected |
Definition at line 70 of file TestTest.php.
72 if (PHP_VERSION_ID >= 50300) {
73 return include
'PHP53/TestInclude.php';
76 return parent::getEnvironment();
◆ getTests()
Twig_Tests_Node_Expression_TestTest::getTests |
( |
| ) |
|
Definition at line 26 of file TestTest.php.
References array, and createTest().
28 $environment =
new Twig_Environment($this->getMockBuilder(
'Twig_LoaderInterface')->getMock());
29 $environment->addTest(
new Twig_SimpleTest(
'barbar',
'twig_tests_test_barbar',
array(
'is_variadic' =>
true,
'need_context' =>
true)));
35 $tests[] =
array($node,
'(null === "foo")');
38 if (PHP_VERSION_ID >= 50300) {
40 $tests[] =
array($node,
'call_user_func_array($this->env->getTest(\'anonymous\')->getCallable(), array("foo", "foo"))');
46 $tests[] =
array($node,
'twig_tests_test_barbar("abc")', $environment);
49 $tests[] =
array($node,
'twig_tests_test_barbar("abc", null, null, array("foo" => "bar"))', $environment);
52 $tests[] =
array($node,
'twig_tests_test_barbar("abc", null, "bar")', $environment);
60 $tests[] =
array($node,
'twig_tests_test_barbar("abc", "1", "2", array(0 => "3", "foo" => "bar"))', $environment);
Represents a node in the AST.
createTest($node, $name, array $arguments=array())
Checks that a variable is null.
Create styles array
The data for the language used.
Represents a template test.
Stores the Twig configuration.
◆ testConstructor()
Twig_Tests_Node_Expression_TestTest::testConstructor |
( |
| ) |
|
Definition at line 14 of file TestTest.php.
References $name.
21 $this->assertEquals($expr, $node->getNode(
'node'));
22 $this->assertEquals($args, $node->getNode(
'arguments'));
23 $this->assertEquals(
$name, $node->getAttribute(
'name'));
Represents a node in the AST.
The documentation for this class was generated from the following file:
- libs/composer/vendor/twig/twig/test/Twig/Tests/Node/Expression/TestTest.php