Skip to content

Commit

Permalink
Isolate bug for #126
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed Jan 28, 2020
1 parent ec45af4 commit df7d3dd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/unit/HTMLDocumentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use Gt\DomTemplate\DocumentFragment;
use Gt\DomTemplate\Element;
use Gt\DomTemplate\HTMLDocument;
use Gt\DomTemplate\Test\Helper\Helper;

class HTMLDocumentTest extends TestCase {
public function testOverriddenClasses() {
Expand All @@ -18,4 +19,11 @@ public function testGetElementById() {
$element = $document->getElementById("test");
self::assertInstanceOf(Element::class, $element);
}

public function testExtractTemplatesSetsParentInnerHTMLToEmpty() {
$document = new HTMLDocument(Helper::HTML_TODO_LIST);
$document->extractTemplates();
$todoListElement = $document->getElementById("todo-list");
self::assertSame("", $todoListElement->innerHTML);
}
}

0 comments on commit df7d3dd

Please sign in to comment.