Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
RawHTML
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 1
 sourceToDom
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getConfig
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2declare( strict_types = 1 );
3
4namespace Wikimedia\Parsoid\ParserTests;
5
6use Wikimedia\Parsoid\DOM\DocumentFragment;
7use Wikimedia\Parsoid\Ext\ExtensionModule;
8use Wikimedia\Parsoid\Ext\ExtensionTagHandler;
9use Wikimedia\Parsoid\Ext\ParsoidExtensionAPI;
10
11class RawHTML extends ExtensionTagHandler implements ExtensionModule {
12    /** @inheritDoc */
13    public function sourceToDom(
14        ParsoidExtensionAPI $extApi, string $content, array $args
15    ): DocumentFragment {
16        return $extApi->htmlToDom( $content );
17    }
18
19    /** @inheritDoc */
20    public function getConfig(): array {
21        return [
22            'name' => 'RawHTML',
23            'tags' => [
24                [ 'name' => 'html', 'handler' => self::class ],
25            ],
26        ];
27    }
28}