Skip to content

Commit

Permalink
Edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
Genert Org committed Jul 17, 2017
1 parent 55f892a commit 9c5f0fc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,4 +223,14 @@ public function testAddParser()
'<a href="www.yourlinkhere.com">Text to be displayed</a>.'
);
}

public function testEdgeCases()
{
$bbCode = new BBCode();

$this->assertEquals(
$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>'),
'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]'
);
}
}

0 comments on commit 9c5f0fc

Please sign in to comment.