Skip to content

Commit

Permalink
Add an extra Assertion to testStripLinks() method for checking "javas…
Browse files Browse the repository at this point in the history
…cript:void(0)"
  • Loading branch information
sohelrana820 committed Mar 16, 2018
1 parent 8a659e5 commit 79ef344
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/TestCase/Utility/TextTest.php
Expand Up @@ -845,6 +845,11 @@ public function testStripLinks()
$result = $this->Text->stripLinks($text); $result = $this->Text->stripLinks($text);
$this->assertEquals($expected, $result); $this->assertEquals($expected, $result);


$text = 'This <strong><a href="#">is</a></strong> a <a href="javascript:void(0)">test</a> text';
$expected = 'This <strong>is</strong> a test text';
$result = $this->Text->stripLinks($text);
$this->assertEquals($expected, $result);

$text = '<a<a h> href=\'bla\'>test</a</a>>'; $text = '<a<a h> href=\'bla\'>test</a</a>>';
$this->assertEquals('test', $this->Text->stripLinks($text)); $this->assertEquals('test', $this->Text->stripLinks($text));


Expand Down

0 comments on commit 79ef344

Please sign in to comment.