18 use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
29 'EscapeChildrenEnabledAndEscapeOutputDisabled: Tag syntax with children, properly encodes variable value' =>
31 '<ft:escapeChildrenEnabledAndEscapeOutputDisabled>{settings.test}</ft:escapeChildrenEnabledAndEscapeOutputDisabled>',
32 '<strong>Bla</strong>'
34 'EscapeChildrenEnabledAndEscapeOutputDisabled: Inline syntax with children, properly encodes variable value' =>
36 '{settings.test -> ft:escapeChildrenEnabledAndEscapeOutputDisabled()}',
37 '<strong>Bla</strong>'
39 'EscapeChildrenEnabledAndEscapeOutputDisabled: Tag syntax with argument, does not encode variable value' =>
41 '<ft:escapeChildrenEnabledAndEscapeOutputDisabled content="{settings.test}" />',
42 '<strong>Bla</strong>'
44 'EscapeChildrenEnabledAndEscapeOutputDisabled: Inline syntax with argument, does not encode variable value' =>
46 '{ft:escapeChildrenEnabledAndEscapeOutputDisabled(content: settings.test)}',
47 '<strong>Bla</strong>'
49 'EscapeChildrenEnabledAndEscapeOutputDisabled: Inline syntax with string, does not encode string value' =>
51 '{ft:escapeChildrenEnabledAndEscapeOutputDisabled(content: \'<strong>Bla</strong>\')}',
52 '<strong>Bla</strong>'
54 'EscapeChildrenEnabledAndEscapeOutputDisabled: Inline syntax with argument in quotes, does not encode variable value' =>
56 '{ft:escapeChildrenEnabledAndEscapeOutputDisabled(content: \'{settings.test}\')}',
57 '<strong>Bla</strong>'
59 'EscapeChildrenEnabledAndEscapeOutputDisabled: Tag syntax with nested inline syntax and children rendering, does not encode variable value' =>
61 '<ft:escapeChildrenEnabledAndEscapeOutputDisabled content="{settings.test -> ft:escapeChildrenEnabledAndEscapeOutputDisabled()}" />',
62 '<strong>Bla</strong>'
64 'EscapeChildrenEnabledAndEscapeOutputDisabled: Tag syntax with nested inline syntax and argument in inline, does not encode variable value' =>
66 '<ft:escapeChildrenEnabledAndEscapeOutputDisabled content="{ft:escapeChildrenEnabledAndEscapeOutputDisabled(content: settings.test)}" />',
67 '<strong>Bla</strong>'
70 'EscapeChildrenDisabledAndEscapeOutputDisabled: Tag syntax with children, properly encodes variable value' =>
72 '<ft:escapeChildrenDisabledAndEscapeOutputDisabled>{settings.test}</ft:escapeChildrenDisabledAndEscapeOutputDisabled>',
73 '<strong>Bla</strong>'
75 'EscapeChildrenDisabledAndEscapeOutputDisabled: Inline syntax with children, properly encodes variable value' =>
77 '{settings.test -> ft:escapeChildrenDisabledAndEscapeOutputDisabled()}',
78 '<strong>Bla</strong>'
80 'EscapeChildrenDisabledAndEscapeOutputDisabled: Tag syntax with argument, does not encode variable value' =>
82 '<ft:escapeChildrenDisabledAndEscapeOutputDisabled content="{settings.test}" />',
83 '<strong>Bla</strong>'
85 'EscapeChildrenDisabledAndEscapeOutputDisabled: Inline syntax with argument, does not encode variable value' =>
87 '{ft:escapeChildrenDisabledAndEscapeOutputDisabled(content: settings.test)}',
88 '<strong>Bla</strong>'
90 'EscapeChildrenDisabledAndEscapeOutputDisabled: Inline syntax with string, does not encode string value' =>
92 '{ft:escapeChildrenDisabledAndEscapeOutputDisabled(content: \'<strong>Bla</strong>\')}',
93 '<strong>Bla</strong>'
95 'EscapeChildrenDisabledAndEscapeOutputDisabled: Inline syntax with argument in quotes, does not encode variable value' =>
97 '{ft:escapeChildrenDisabledAndEscapeOutputDisabled(content: \'{settings.test}\')}',
98 '<strong>Bla</strong>'
100 'EscapeChildrenDisabledAndEscapeOutputDisabled: Tag syntax with nested inline syntax and children rendering, does not encode variable value' =>
102 '<ft:escapeChildrenDisabledAndEscapeOutputDisabled content="{settings.test -> ft:escapeChildrenDisabledAndEscapeOutputDisabled()}" />',
103 '<strong>Bla</strong>'
105 'EscapeChildrenDisabledAndEscapeOutputDisabled: Tag syntax with nested inline syntax and argument in inline, does not encode variable value' =>
107 '<ft:escapeChildrenDisabledAndEscapeOutputDisabled content="{ft:escapeChildrenDisabledAndEscapeOutputDisabled(content: settings.test)}" />',
108 '<strong>Bla</strong>'
124 $view->assign(
'settings', [
'test' =>
'<strong>Bla</strong>']);
125 $view->getRenderingContext()->getViewHelperResolver()->addNamespace(
'ft',
'TYPO3Fluid\\FluidTest\\ViewHelpers');
126 $view->getRenderingContext()->getTemplatePaths()->setTemplateSource($viewHelperTemplate);
128 $this->assertSame($expectedOutput, $view->render());