9 namespace Fossology\Lib\Html;
14 public function testElementWithoutAttributes()
18 assertThat($element->getOpeningText(), is(
"<p>"));
19 assertThat($element->getClosingText(), is(
"</p>"));
22 public function testElementWithSingleAttribute()
26 assertThat($element->getOpeningText(), is(
"<p class=\"extra\">"));
27 assertThat($element->getClosingText(), is(
"</p>"));
30 public function testElementWithSingleAttributeSetAfterConstruction()
33 $element->setAttribute(
"class",
"other");
35 assertThat($element->getOpeningText(), is(
"<p class=\"other\">"));
36 assertThat($element->getClosingText(), is(
"</p>"));
39 public function testElementWithTwoAttributes()
41 $element =
new SimpleHtmlElement(
"p", array(
"class" =>
"extra",
"style" =>
"font-size: 10pt;"));
43 assertThat($element->getOpeningText(), is(
"<p class=\"extra\" style=\"font-size: 10pt;\">"));
44 assertThat($element->getClosingText(), is(
"</p>"));