Commit graph

4 commits

Author SHA1 Message Date
daniel
cee1d08550 HTMLTransform: add more tests
This improves test coverage by testing the interaction of getters and
setters.

Change-Id: I90506d73e5571fda6c26eb72359e41951b3950c1
2022-08-26 11:33:39 +02:00
daniel
df0744f402 Split setOriginalData( ... ) to more related setters for encapsulation
By splitting the setOriginalData methods into several setters, we remove
any knowledge about the structure of the request body from HTMLTransform.
It also allows us to be specific about which data to operate on.

This also removes the concept of page bundles from the public interface
of HTMLTransform. PageBundle objects are used only internally.

Change-Id: If97a74ce251f281b7d980928a01b764d6ec0d0a4
2022-08-25 18:40:26 +02:00
Subramanya Sastry
86f2b26589 Don't hardcode Parsoid HTML version number in tests
* Without this fix, the test fails vendor patches whenever Parsoid's
  default version number is bumped in the Parsoid repo.

Change-Id: Icce7b61dfbbbbd57b4f1ed76a32d160e92b48b15
2022-08-12 14:29:25 -05:00
Derick Alangi
b078f598f9 Move transformHtmlToWikitext() and getSelserData() to HTMLTransform
This patch moves remaining transformation logic to a renamed (from
HTMLTransformInput -> HTMLTransform) class. Also, the HTMLTransform
class is moved to the correct directory, hence namespace (including
tests).

Some data files have been copied over to it's own sub-directory in
the correct place since HTMLTransformTest needs it. ParsoidHandler
class is fine where it is because its operation is what happens in
the REST land.

NOTE: The 2 remaining methods moved into HTMLTransform are the last
ones we intended to move into this class to make the refactoring of
html2wt() method complete in this context.

Change-Id: I8929931e1b0acf247abe9d826eef57f3e0d4e132
2022-08-11 07:50:53 +01:00
Renamed from tests/phpunit/integration/includes/Rest/Handler/HTMLTransformInputTest.php (Browse further)