aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2016-03-13 12:29:55 +0100
committerMarc Alexander <admin@m-a-styles.de>2016-03-13 12:29:55 +0100
commitdad531e4b2c19dd22b8dd6a15e410e187a67fe46 (patch)
treeee1980ebe491f7e5634f30f4e9e378cba0a8a587
parent58678ff21c9fefd8eed11ad7cd0bbdb1254e49e7 (diff)
downloadforums-dad531e4b2c19dd22b8dd6a15e410e187a67fe46.tar
forums-dad531e4b2c19dd22b8dd6a15e410e187a67fe46.tar.gz
forums-dad531e4b2c19dd22b8dd6a15e410e187a67fe46.tar.bz2
forums-dad531e4b2c19dd22b8dd6a15e410e187a67fe46.tar.xz
forums-dad531e4b2c19dd22b8dd6a15e410e187a67fe46.zip
[ticket/14527] Add tests for reverted improper fix
PHPBB3-14527
-rw-r--r--tests/text_processing/decode_message_test.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/text_processing/decode_message_test.php b/tests/text_processing/decode_message_test.php
index 7de599f2b1..6ee5f91578 100644
--- a/tests/text_processing/decode_message_test.php
+++ b/tests/text_processing/decode_message_test.php
@@ -16,6 +16,15 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
class phpbb_text_processing_decode_message_test extends phpbb_test_case
{
+ public function setUp()
+ {
+ parent::setUp();
+
+ global $phpbb_dispatcher;
+
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher();
+ }
+
/**
* @dataProvider get_legacy_tests
*/
@@ -40,12 +49,20 @@ class phpbb_text_processing_decode_message_test extends phpbb_test_case
),
array(
'<!-- w --><a class="postlink" href="http://www.phpbb.com">www.phpbb.com</a><!-- w -->',
- 'www.phpbb.com'
+ 'http://www.phpbb.com'
),
array(
'<!-- m --><a class="postlink" href="http://www.phpbb.com">http://www.phpbb.com</a><!-- m -->',
'http://www.phpbb.com'
),
+ array(
+ '<!-- m --><a class="postlink" href="http://www.phpbb.com">this is just text</a><!-- m -->',
+ 'http://www.phpbb.com'
+ ),
+ array(
+ '<!-- m --><a class="postlink" href="http://www.phpbb.com/some/more/link/that/is/shortened">http://www.phpbb.com/some/ ... /shortened</a><!-- m -->',
+ 'http://www.phpbb.com/some/more/link/that/is/shortened'
+ ),
/**
* Fails as per PHPBB3-8420
* @link http://tracker.phpbb.com/browse/PHPBB3-8420