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, [], "
123
", '
123
' ], [ true, [], "
123
", 'Test Page
123
' ], [ false, [ [ 'Processor' => Normalize::class ] ], "

hi

ho

", '

hi

ho

' ], [ false, [ [ 'name' => 'CleanUp-handleEmptyElts', 'shortcut' => 'cleanup', 'isTraverser' => true, 'handlers' => [ [ 'nodeName' => null, 'action' => [ CleanUp::class, 'handleEmptyElements' ] ] ] ] ], "

hi

ho

", '

hi

ho

' ] ]; } }