in header uses spaces. $mockEnv = new MockEnv( [ 'title' => 'Test Page' ] ); $dpp = new DOMPostProcessor( $mockEnv ); $dpp->registerProcessors( $processors ); $opts = [ 'toplevel' => $atTopLevel ]; $dpp->resetState( $opts ); $document = ( ContentUtils::ppToDOM( $mockEnv, $html ) )->ownerDocument; $dpp->doPostProcess( $document ); $this->assertEquals( $expected, DOMCompat::getOuterHTML( $document->documentElement ) ); } public function provideDOMPostProcessor() { return [ [ false, [], "
hi
ho
", 'hi
ho
' ], [ false, [ [ 'name' => 'CleanUp-handleEmptyElts', 'shortcut' => 'cleanup', 'isTraverser' => true, 'handlers' => [ [ 'nodeName' => null, 'action' => [ CleanUp::class, 'handleEmptyElements' ] ] ] ] ], "hi
ho
", 'hi
ho
' ] ]; } }