25 public function testElementWithoutAttributes()
29 assertThat($element->getOpeningText(), is(
"<p>"));
30 assertThat($element->getClosingText(), is(
"</p>"));
33 public function testElementWithSingleAttribute()
37 assertThat($element->getOpeningText(), is(
"<p class=\"extra\">"));
38 assertThat($element->getClosingText(), is(
"</p>"));
41 public function testElementWithSingleAttributeSetAfterConstruction()
44 $element->setAttribute(
"class",
"other");
46 assertThat($element->getOpeningText(), is(
"<p class=\"other\">"));
47 assertThat($element->getClosingText(), is(
"</p>"));
50 public function testElementWithTwoAttributes()
52 $element =
new SimpleHtmlElement(
"p", array(
"class" =>
"extra",
"style" =>
"font-size: 10pt;"));
54 assertThat($element->getOpeningText(), is(
"<p class=\"extra\" style=\"font-size: 10pt;\">"));
55 assertThat($element->getClosingText(), is(
"</p>"));