diff --git a/tests/PureHTMLDefinition.php b/tests/PureHTMLDefinition.php
index 28046fa3..76340d98 100644
--- a/tests/PureHTMLDefinition.php
+++ b/tests/PureHTMLDefinition.php
@@ -375,8 +375,9 @@ class Test_PureHTMLDefinition extends UnitTestCase
$inputs = array();
$expect = array();
- // some legal nestings
+ // next id = 4
+ // legal inline nesting
$inputs[0] = array(
new MF_StartTag('b'),
new MF_Text('Bold text'),
@@ -384,7 +385,7 @@ class Test_PureHTMLDefinition extends UnitTestCase
);
$expect[0] = $inputs[0];
- // test acceptance of inline and block
+ // legal inline and block
// as the parent element is considered FLOW
$inputs[1] = array(
new MF_StartTag('a', array('href' => 'http://www.example.com/')),
@@ -396,7 +397,7 @@ class Test_PureHTMLDefinition extends UnitTestCase
);
$expect[1] = $inputs[1];
- // test illegal block element -> text
+ // illegal block in inline, element -> text
$inputs[2] = array(
new MF_StartTag('b'),
new MF_StartTag('div'),
@@ -412,6 +413,18 @@ class Test_PureHTMLDefinition extends UnitTestCase
new MF_EndTag('b'),
);
+ // illegal in
+ $inputs[3] = array(
+ new MF_StartTag('a'),
+
+ new MF_EndTag('a')
+ );
+ $expect[3] = array(
+ new MF_StartTag('a'),
+
+ new MF_EndTag('a')
+ );
+
foreach ($inputs as $i => $input) {
$result = $this->def->fixNesting($input);
$this->assertEqual($expect[$i], $result);