From 9c5f0fc9e7175b130c0a285622b7ee0b9dfff5af Mon Sep 17 00:00:00 2001 From: Genert Org Date: Mon, 17 Jul 2017 13:43:02 +0300 Subject: [PATCH] Edge case --- tests/ParserTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/ParserTest.php b/tests/ParserTest.php index 2b9cd09..546e6ce 100644 --- a/tests/ParserTest.php +++ b/tests/ParserTest.php @@ -223,4 +223,14 @@ public function testAddParser() 'Text to be displayed.' ); } + + public function testEdgeCases() + { + $bbCode = new BBCode(); + + $this->assertEquals( + $bbCode->convertFromHtml('This is <b>test</b><strong></strong><strong></strong>'), + 'This[b] [/b][url=http://genert.org][b]is[/b] [i]<b>test</b><strong></strong><strong[/i]><[u]/stro[/u]ng>[/url]' + ); + } }