aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2016-03-25 11:35:47 +0100
committerTristan Darricau <tristan.darricau@sensiolabs.com>2016-03-25 11:35:47 +0100
commit8d989810121e3baf315ceaf8d9cd225317a625d9 (patch)
tree9088f5d32cf8b569957b0846a7a6b6006f35e827 /tests
parentf29ebb1846caadc9622cad69098e5638f6c9f155 (diff)
parent17b8e93a5350e297f9be0925120f0b6cf34f5ffe (diff)
downloadforums-8d989810121e3baf315ceaf8d9cd225317a625d9.tar
forums-8d989810121e3baf315ceaf8d9cd225317a625d9.tar.gz
forums-8d989810121e3baf315ceaf8d9cd225317a625d9.tar.bz2
forums-8d989810121e3baf315ceaf8d9cd225317a625d9.tar.xz
forums-8d989810121e3baf315ceaf8d9cd225317a625d9.zip
Merge pull request #4218 from marc1706/ticket/14527
[ticket/14527] Retrieve link URL from href and not link text * marc1706/ticket/14527: [ticket/14527] Decode automatically generated postlink without prefix [ticket/14527] Add tests for reverted improper fix [ticket/14527] Retrieve link URL from href and not link text
Diffstat (limited to 'tests')
-rw-r--r--tests/text_processing/decode_message_test.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/text_processing/decode_message_test.php b/tests/text_processing/decode_message_test.php
index 7de599f2b1..fd1719fedc 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
*/
@@ -46,6 +55,14 @@ class phpbb_text_processing_decode_message_test extends phpbb_test_case
'<!-- 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