diff options
author | daniel <dkinzler@wikimedia.org> | 2020-11-20 21:46:41 +0100 |
---|---|---|
committer | Ppchelko <ppchelko@wikimedia.org> | 2020-12-02 18:08:12 +0000 |
commit | b98f7a6fc1bd2b6ffd8e2df46d4f6449e14e9227 (patch) | |
tree | 4ee35a6f9a32217d06ee5e8f93cc23c39eed583d /tests/phpunit/integration/includes/Rest/Handler/PageHTMLHandlerTest.php | |
parent | d2565533c4c68ac27dd3a992d74a6a7f4dbd0a58 (diff) | |
download | mediawikicore-b98f7a6fc1bd2b6ffd8e2df46d4f6449e14e9227.tar.gz mediawikicore-b98f7a6fc1bd2b6ffd8e2df46d4f6449e14e9227.zip |
Extract helper classes from PageHTMLHandler
This extracts two helper classes from PageHTMLHandler:
* PageContentHelper for accessing page content. This replaces the
LatestRevisionContentHandler mase class.
* ParsoidHtmlHelper for generating HTML from wikitext using parsoid.
The idea is to decouple the functionality from the REST handlers, so we
can easily mix and match functionality to create a handler for the
new per-revision HTML endpoint.
Bug: T267981
Bug: T267982
Change-Id: I3226833d12e51c959712d642b0195de1fe1ef979
Diffstat (limited to 'tests/phpunit/integration/includes/Rest/Handler/PageHTMLHandlerTest.php')
-rw-r--r-- | tests/phpunit/integration/includes/Rest/Handler/PageHTMLHandlerTest.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/phpunit/integration/includes/Rest/Handler/PageHTMLHandlerTest.php b/tests/phpunit/integration/includes/Rest/Handler/PageHTMLHandlerTest.php index fecc42199f95..94bfa643999e 100644 --- a/tests/phpunit/integration/includes/Rest/Handler/PageHTMLHandlerTest.php +++ b/tests/phpunit/integration/includes/Rest/Handler/PageHTMLHandlerTest.php @@ -88,8 +88,9 @@ class PageHTMLHandlerTest extends MediaWikiIntegrationTestCase { ); if ( $parsoid !== null ) { - $wrapper = TestingAccessWrapper::newFromObject( $handler ); - $wrapper->parsoid = $parsoid; + $handlerWrapper = TestingAccessWrapper::newFromObject( $handler ); + $helperWrapper = TestingAccessWrapper::newFromObject( $handlerWrapper->htmlHelper ); + $helperWrapper->parsoid = $parsoid; } return $handler; |