mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 17:51:09 +00:00
tests: Fix wrong $rootNode in some tests using CommentParser::getComments()
Rather than the <body> node, we were passing <body>'s first child.
Current implementation of CommentParser::getComments() doesn't fail
the tests in spite of this because the XPath query incorrectly returns
results relative to the document's real root node, but these tests
would start failing after I2441f33e6e7bad753ac830d277e6a2e81ee8c93d.
Follow-up to 3e6ab2c4d2
.
Change-Id: Ic26e0a1ee4443987e215c5f26ef1f084ccd0b40b
This commit is contained in:
parent
01ce5afaa9
commit
08b467bf9f
|
@ -28,7 +28,7 @@ class CommentModifierTest extends CommentTestCase {
|
|||
$this->setupEnv( $config, $data );
|
||||
|
||||
$doc = self::createDocument( $dom );
|
||||
$container = $doc->getElementsByTagName( 'body' )->item( 0 )->firstChild;
|
||||
$container = $doc->getElementsByTagName( 'body' )->item( 0 );
|
||||
|
||||
$parser = self::createParser( $data );
|
||||
$comments = $parser->getComments( $container );
|
||||
|
@ -69,7 +69,7 @@ class CommentModifierTest extends CommentTestCase {
|
|||
$this->setupEnv( $config, $data );
|
||||
|
||||
$doc = self::createDocument( $dom );
|
||||
$container = $doc->getElementsByTagName( 'body' )->item( 0 )->firstChild;
|
||||
$container = $doc->getElementsByTagName( 'body' )->item( 0 );
|
||||
|
||||
$parser = self::createParser( $data );
|
||||
$comments = $parser->getComments( $container );
|
||||
|
|
|
@ -286,7 +286,7 @@ class CommentParserTest extends CommentTestCase {
|
|||
$parser = self::createParser( $data );
|
||||
|
||||
$doc = self::createDocument( $dom );
|
||||
$container = $doc->getElementsByTagName( 'body' )->item( 0 )->firstChild;
|
||||
$container = $doc->getElementsByTagName( 'body' )->item( 0 );
|
||||
|
||||
CommentUtils::unwrapParsoidSections( $container );
|
||||
|
||||
|
|
Loading…
Reference in a new issue