Skip to content

Commit

Permalink
Verifying Bug #11400: Lists start with an empty listitem
Browse files Browse the repository at this point in the history
  • Loading branch information
cweiske committed Jul 2, 2007
1 parent 2f280e8 commit 50a7336
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/BBCodeParser.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,27 @@ class BBCodeParser_TestCase extends PHPUnit_TestCase
$bbc->$funcNam('[align=foo"><script>alert(\'JavaScript_Enabled\');</script>][/align]')
);
}



function testBug11400()
{
$bbc = new HTML_BBCodeParser(array('filters' => ''));
$bbc->addFilter('Lists');

//this works
$this->assertEquals('<ul><li>one</li><li>two</li></ul>',
$bbc->qparse("[ulist][*]one[*]two[/ulist]")
);
//this not
$this->assertEquals('<ul><li>one</li><li>two</li></ul>',
$bbc->qparse("[ulist] [*]one[*]two[/ulist]")
);
//this not
$this->assertEquals('<ol><li>one</li><li>two</li></ol>',
$bbc->qparse("[list] [*]one[*]two[/list]")
);
}
}

//Run tests if run from the command line
Expand Down

0 comments on commit 50a7336

Please sign in to comment.