Last modified: 2014-02-12 23:39:50 UTC
Parsoid uses the PHP parser to expand extensions and incorporate them into the token stream. However, there are no tests for this functionality since parserTests does not use the API. So, we need another way of testing this functionality -- possibly something that might require a wiki with installed extensions. This might be a spinoff of parsertests that either stubs the wiki/api (ideal since it doesn't rely on Net access) or calls an existing wiki. What we are interested here is not so much on extension output itself but that Parsoid does handle extension tags and incorporate that into the token stream for it to RT correctly. So, stubbed API that returns dummy content is not necessarily a bad thing. Something that is achievable either by adding additional options to the parserTests.js script or by writing a new script that uses/inherits from it. This testing framework would have to be accompanied with an initial set of tests for one or two extensions.
Implemented in https://gerrit.wikimedia.org/r/#/c/52090/ Do we need any additional tests or are we done with this?
So far we are not yet testing extensions in the mock API. For that we'd need an action=parse mock end point. And a way to use that from parserTests.
Our mock API should also emit two trailing newlines from the action=parse stand-in to test stripping for those as discussed in bug 50713.