assertEquals($t, $node->getNode('tests')); $this->assertFalse($node->hasNode('else')); $else = new PrintNode(new ContextVariable('bar', 1), 1); $node = new IfNode($t, $else, 1); $this->assertEquals($else, $node->getNode('else')); } public static function provideTests(): iterable { $tests = []; $t = new Nodes([ new ConstantExpression(true, 1), new PrintNode(new ContextVariable('foo', 1), 1), ], 1); $else = null; $node = new IfNode($t, $else, 1); $fooGetter = self::createVariableGetter('foo'); $barGetter = self::createVariableGetter('bar'); $tests[] = [$node, <<