aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoshyPHP <s9e.dev@gmail.com>2015-12-06 22:08:00 +0100
committerJoshyPHP <s9e.dev@gmail.com>2015-12-26 14:20:39 +0100
commitad2c032d3b748d177403fd495685977f7964f8d4 (patch)
tree6f7e4d53f9aa1e8389849bf0434f98620e2b0fd1 /tests
parentf9d8866aee9bca746801ef0360a5ab350d04061d (diff)
downloadforums-ad2c032d3b748d177403fd495685977f7964f8d4.tar
forums-ad2c032d3b748d177403fd495685977f7964f8d4.tar.gz
forums-ad2c032d3b748d177403fd495685977f7964f8d4.tar.bz2
forums-ad2c032d3b748d177403fd495685977f7964f8d4.tar.xz
forums-ad2c032d3b748d177403fd495685977f7964f8d4.zip
[ticket/14323] Moved autolink-related functions to a separate helper
PHPBB3-14323
Diffstat (limited to 'tests')
-rw-r--r--tests/test_framework/phpbb_test_case_helpers.php17
-rw-r--r--tests/text_formatter/s9e/factory_test.php1
2 files changed, 8 insertions, 10 deletions
diff --git a/tests/test_framework/phpbb_test_case_helpers.php b/tests/test_framework/phpbb_test_case_helpers.php
index aa58b3974b..dacf9d923f 100644
--- a/tests/test_framework/phpbb_test_case_helpers.php
+++ b/tests/test_framework/phpbb_test_case_helpers.php
@@ -469,16 +469,13 @@ class phpbb_test_case_helpers
}
// Set up the a minimum config
- if (!isset($config))
+ if ($container->has('config'))
{
- if ($container->has('config'))
- {
- $config = $container->get('config');
- }
- else
- {
- $config = new \phpbb\config\config(array());
- }
+ $config = $container->get('config');
+ }
+ elseif (!isset($config))
+ {
+ $config = new \phpbb\config\config(array());
}
$default_config = array(
'allow_nocensors' => false,
@@ -504,7 +501,7 @@ class phpbb_test_case_helpers
}
// Create and register the text_formatter.s9e.factory service
- $factory = new \phpbb\textformatter\s9e\factory($dal, $cache, $dispatcher, $config, $cache_dir, $cache_key_parser, $cache_key_renderer);
+ $factory = new \phpbb\textformatter\s9e\factory($dal, $cache, $dispatcher, $config, new \phpbb\textformatter\s9e\autolink_helper, $cache_dir, $cache_key_parser, $cache_key_renderer);
$container->set('text_formatter.s9e.factory', $factory);
// Create a user if none was provided, and add the common lang strings
diff --git a/tests/text_formatter/s9e/factory_test.php b/tests/text_formatter/s9e/factory_test.php
index 77f27d6547..dbf28b1d38 100644
--- a/tests/text_formatter/s9e/factory_test.php
+++ b/tests/text_formatter/s9e/factory_test.php
@@ -50,6 +50,7 @@ class phpbb_textformatter_s9e_factory_test extends phpbb_database_test_case
$this->cache,
$this->dispatcher,
new \phpbb\config\config(array('allowed_schemes_links' => 'http,https,ftp')),
+ new \phpbb\textformatter\s9e\autolink_helper,
$this->get_cache_dir(),
'_foo_parser',
'_foo_renderer'