assertEquals( $html, $actualHtml ); $actualWt = WTUtils::decodeComment( $html ); $this->assertEquals( $wikitext, $actualWt ); $doc = new \DOMDocument(); $doc->loadHTML( "" ); $body = $doc->getElementsByTagName( "body" )->item( 0 ); $node = $body->childNodes->item( 0 ); $actualLen = WTUtils::decodedCommentLength( $node ); $this->assertEquals( $length, $actualLen ); } public function provideCommentEncoding() { // length includes the length of the delimiters return [ [ 'abc', 'abc', 10 ], [ '& - >', '& - >', 12 ], [ 'Use > here', 'Use > here', 20 ], [ '-->', '-->', 13 ], [ '-->', '-->', 17 ], [ '-->','-->', 21 ], ]; } }