Browse Source

Added two failing unit tests

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@20578 44c647ce-9c0f-0410-b52a-842ac1e357ba
dasprid 16 years ago
parent
commit
a794406fd6
1 changed files with 14 additions and 0 deletions
  1. 14 0
      tests/Zend/Markup/BbcodeAndHtmlTest.php

+ 14 - 0
tests/Zend/Markup/BbcodeAndHtmlTest.php

@@ -257,6 +257,20 @@ class Zend_Markup_BbcodeAndHtmlTest extends PHPUnit_Framework_TestCase
         $this->assertEquals('<ul><li>blaat</li></ul>', $this->_markup->render('[list][*]blaat[/*][/list]'));
     }
 
+    public function testListDisallowingPlaintext()
+    {
+        $input = "[list]\ntest[*]Foo[/*]\n[/list]";
+        $expected = "<ul><li>Foo</li></ul>";
+        $this->assertEquals($expected, $this->_markup->render($input));
+    }
+
+    public function testFailureAfterCodeTag()
+    {
+        $input = "[code][b][/code][list][*]Foo[/*][/list]";
+        $expected = "<code>[b]</code><ul><li>Foo</li></ul>";
+        $this->assertEquals($expected, $this->_markup->render($input));
+    }
+
     public function testListTypes()
     {
         $types = array(