1<?php
2
3require_once(__DIR__ . '/../webcomponent.php');
4
5/**
6 * Test the component plugin
7 *
8 * @group plugin_webcomponent
9 * @group plugins
10 */
11class plugin_webcomponent_test extends DokuWikiTest
12{
13
14
15    public function test_parse_parameters_base()
16    {
17        $match = ' class="nico"';
18        $parameters = webcomponent::parseMatch($match);
19        $this->assertEquals("nico", $parameters["class"]);
20
21    }
22
23    public function test_parse_parameters_no_content()
24    {
25
26        $match = ' class="" ';
27        $parameters = webcomponent::parseMatch($match);
28        $this->assertEquals("", $parameters["class"]);
29        $this->assertEquals(true, array_key_exists("class",$parameters));
30
31    }
32
33}