Skip to content

Commit 9c5f0fc

Browse files
author
Genert Org
committed
Edge case
1 parent 55f892a commit 9c5f0fc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/ParserTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,4 +223,14 @@ public function testAddParser()
223223
'<a href="www.yourlinkhere.com">Text to be displayed</a>.'
224224
);
225225
}
226+
227+
public function testEdgeCases()
228+
{
229+
$bbCode = new BBCode();
230+
231+
$this->assertEquals(
232+
$bbCode->convertFromHtml('This<strong> </strong><a href="http://genert.org"><strong>is</strong> <i>&lt;b&gt;test&lt;/b&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong</i>&gt;&lt;<u>/stro</u>ng&gt;</a>'),
233+
'This[b] [/b][url=http://genert.org][b]is[/b] [i]&lt;b&gt;test&lt;/b&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong[/i]&gt;&lt;[u]/stro[/u]ng&gt;[/url]'
234+
);
235+
}
226236
}

0 commit comments

Comments
 (0)