theme-test-deprecations-preprocess.html.twig

Same filename in other branches
  1. 10 core/modules/system/tests/modules/theme_test/templates/theme-test-deprecations-preprocess.html.twig
{# Test use of variables deprecated in a preprocess hook. #}
{% set set_var = 'set_var' %}
{{- foo }}|
{{- set_var }}|
{%- for for_var in contents %}
    {{- for_var }}|
{%- endfor %}
{{- bar }}
1 theme call to theme-test-deprecations-preprocess.html.twig
TwigDeprecationsTest::assertRendered in core/tests/Drupal/KernelTests/Core/Theme/TwigDeprecationsTest.php
Assert that 'theme_test_deprecations_preprocess' renders expected text.

File

core/modules/system/tests/modules/theme_test/templates/theme-test-deprecations-preprocess.html.twig

View source
  1. {# Test use of variables deprecated in a preprocess hook. #}
  2. {% set set_var = 'set_var' %}
  3. {{- foo }}|
  4. {{- set_var }}|
  5. {%- for for_var in contents %}
  6. {{- for_var }}|
  7. {%- endfor %}
  8. {{- bar }}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.