Skip to content

Commit 8fccd89

Browse files
committed
Added coverage for paquettg#174
1 parent 4e3158c commit 8fccd89

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/DomTest.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,8 +634,19 @@ public function testFindDescendantsOfMatch()
634634
<i><b>another</b></i>
635635
</p>');
636636

637-
/** @var Dom\AbstractNode $meta */
638637
$nodes = $dom->find('b');
639638
$this->assertCount(5, $nodes);
640639
}
640+
641+
public function testCompatibleWithWordPressShortcode()
642+
{
643+
$dom = new Dom();
644+
$dom->load('<p>
645+
[wprs_alert type="success" content="this is a short code" /]
646+
</p>');
647+
648+
$node = $dom->find('p', 0);
649+
$this->assertEquals(' [wprs_alert type="success" content="this is a short code" /] ', $node->innerHtml);
650+
651+
}
641652
}

0 commit comments

Comments
 (0)