mediawiki-extensions-Templa.../tests/phpunit
Thiemo Kreuz 1c0687c850 Fix wrapper="…" failing for more complex selectors
For example, <templatestyles wrapper="a[href]" /> fails with an
InvalidArgumentException very late in the process, long after
the actual validation in TemplateStylesHooks::validateExtraWrapper()
was done. This happens because validateExtraWrapper() works on a
proper tree (where the [href] from the example is a nested object),
but flattens this tree in the end via toTokenArray(). This
flattened array ends in StyleRuleSanitizer::doSanitize() where it
is added to a ComponentValueList – which expects a tree.

The only change in this patch is that the object structure is not
flattened any more. That's all.

Bug: T258093
Change-Id: I5dc04611f91fe672da706f31fa8d0c254e3123d3
2020-10-15 06:51:21 +00:00
..
unit Make unit tests follow the new structure 2019-07-21 23:05:08 +02:00
TemplateStylesContentHandlerTest.php Add @covers tags 2018-02-05 18:19:30 -08:00
TemplateStylesContentTest.php build: Upgrade mediawiki-codesniffer to v28.0.0 2019-10-15 15:59:23 -07:00
TemplateStylesHooksTest.php Fix wrapper="…" failing for more complex selectors 2020-10-15 06:51:21 +00:00