Must create a template file in the cache to load as this causes errors
otherwise. The problem was that Twig builds template files into classes,
which are always stored in PHP memory after being loaded. Because of this,
Twig would never recompile a template that was already compiled on the same
page load (so switching enable PHP on/off in two tests would not work).
PHPBB3-11598
# By Dhruv (7) and others
# Via Andreas Fischer (7) and others
* 'develop' of https://github.com/phpbb/phpbb3:
[ticket/11593] initialize $is_expr as null before being passed to get_varref
[ticket/9341] Assert that page doesnt contain next or prev page posts
[ticket/9341] Follow the Next/Prev link in tests follow the next/prev link and then assert if the page contains its last post or not
[ticket/9341] remove PREV_PAGE tpl var used for backward compatability
[ticket/11618] Replace glob() with scandir() and string matching
[ticket/9341] Add tests for checking Next and Previous template vars
[ticket/9341] Move create_topic and post into functional test case
[ticket/11615] Fix typo in creation_test
[ticket/11615] Remove magic number in creation_test
[ticket/11615] Rename class in file to match
[ticket/11615] Rename init_test to creation_test for clarity
[ticket/9341] Use U_PREVIOUS and U_NEXT in template files
[ticket/9341] Correctly named template vars
Conflicts:
tests/template/template_test_case.php
* dhruvgoel92/ticket/9341:
[ticket/9341] Assert that page doesnt contain next or prev page posts
[ticket/9341] Follow the Next/Prev link in tests follow the next/prev link and then assert if the page contains its last post or not
[ticket/9341] remove PREV_PAGE tpl var used for backward compatability
[ticket/9341] Add tests for checking Next and Previous template vars
[ticket/9341] Move create_topic and post into functional test case
[ticket/9341] Use U_PREVIOUS and U_NEXT in template files
[ticket/9341] Correctly named template vars
* asperous/ticket/11615/creation_test:
[ticket/11615] Fix typo in creation_test
[ticket/11615] Remove magic number in creation_test
[ticket/11615] Rename class in file to match
[ticket/11615] Rename init_test to creation_test for clarity
* develop-olympus:
[ticket/11615] Fix typo in creation_test
[ticket/11615] Remove magic number in creation_test
[ticket/11615] Rename class in file to match
[ticket/11615] Rename init_test to creation_test for clarity
* asperous/ticket/11615/creation_test:
[ticket/11615] Fix typo in creation_test
[ticket/11615] Remove magic number in creation_test
[ticket/11615] Rename class in file to match
[ticket/11615] Rename init_test to creation_test for clarity
No longer using the begin tokenparser/node as it did not allow proper
handling of <!-- BEGIN !foo, <!-- BEGIN foo(0,2). Now the lexer will
use regular expressions to handle that correctly and replace it with Twig's
for token
Also fixing <!-- IF .foo as I discovered it evaluates to if sizeof(foo)
PHPBB3-11598
According to the test, template event behavior was never correct.
Only ONE template event file is supposed to be included from EACH
extension. As it was before, EVERY matching template event file from
each extension was included (this was how it was designed).
E.g.
Event call in prosilver "foo"
Extension has template "foo" in prosilver AND all
foo from all would be included, then foo from prosilver would be included
This was clearly not designed correctly as only the most specific event
file from each extension should be loaded, otherwise events could only
ever be put in a single style tree (either only all, or only prosilver
and subsilver2 and any style that inherits from neither of those).
Otherwise the events would be duplicated on output (which is clearly not
desirable).
The Twig behavior already was correct as I designed it, so only the one
most specific template event file found would be included from each
extension. The tests had to be updated for the correct expected output.
PHPBB3-11598