From 79ef34430dc49133b9e6734bd52e91c075a6eddf Mon Sep 17 00:00:00 2001 From: sohelrana820 Date: Sat, 17 Mar 2018 03:55:06 +0600 Subject: [PATCH] Add an extra Assertion to testStripLinks() method for checking "javascript:void(0)" --- tests/TestCase/Utility/TextTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/TestCase/Utility/TextTest.php b/tests/TestCase/Utility/TextTest.php index 83d5ae1a2bf..ceea5c9b71c 100644 --- a/tests/TestCase/Utility/TextTest.php +++ b/tests/TestCase/Utility/TextTest.php @@ -845,6 +845,11 @@ public function testStripLinks() $result = $this->Text->stripLinks($text); $this->assertEquals($expected, $result); + $text = 'This is a test text'; + $expected = 'This is a test text'; + $result = $this->Text->stripLinks($text); + $this->assertEquals($expected, $result); + $text = ' href=\'bla\'>test>'; $this->assertEquals('test', $this->Text->stripLinks($text));