The tests written for extension template events did not follow the convention
and documentation of placing template event files in the events/ subdirectory.
Moved the files to this subdirectory so the tests succeed again.
PHPBB3-11777
This was set to default 'template/' to append template/ to all the paths,
but every location was actually just setting it to '' to not append anything.
So removed the option entirely (additional paths can be appended to the paths
being sent to the function already)
PHPBB3-11628
This was basically duplicating functionality. $names would be used if not
empty, else array($name) would be used. Merged functionality into the first
argument
PHPBB3-11628
* EXreaction/ticket/11718:
[ticket/11718] Quick test for fixes in ELSEIF
[ticket/11718] Twig lexer only correcting statements in IF, not ELSEIF
Conflicts:
tests/template/template_test.php
Changed expected output to file?(any supplied argument string)&asset_version
=($config['asset_version'])#(any supplied anchor string)
Testing lines one at a time to make checking them easier.
PHPBB3-11388
Was originally moved because I thought that a new test file might mean a new
instance and the memory would be cleared, fixing the original problem, but
that isn't true and it was fixed another way.
PHPBB3-11598
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
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