Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 11
RawHTML
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 11
 sourceToDom
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 4
 getConfig
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 7
<?php
declare( strict_types = 1 );
namespace Wikimedia\Parsoid\ParserTests;
use Wikimedia\Parsoid\DOM\DocumentFragment;
use Wikimedia\Parsoid\Ext\ExtensionModule;
use Wikimedia\Parsoid\Ext\ExtensionTagHandler;
use Wikimedia\Parsoid\Ext\ParsoidExtensionAPI;
class RawHTML extends ExtensionTagHandler implements ExtensionModule {
    /** @inheritDoc */
    public function sourceToDom(
        ParsoidExtensionAPI $extApi, string $content, array $args
    ): DocumentFragment {
        return $extApi->htmlToDom( $content );
    }
    /** @inheritDoc */
    public function getConfig(): array {
        return [
            'name' => 'RawHTML',
            'tags' => [
                [ 'name' => 'html', 'handler' => self::class ],
            ],
        ];
    }
}