1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 03:34:04 +02:00

[ticket/15253] Use storage helper methods instead of filesystem methods

PHPBB3-15253
This commit is contained in:
Rubén Calvo
2017-06-26 15:49:31 +02:00
parent 21c9b0eeae
commit ecb79539f4
62 changed files with 109 additions and 598 deletions

View File

@@ -39,9 +39,8 @@ class phpbb_template_includephp_test extends phpbb_template_template_test_case
{
global $phpbb_root_path;
$filesystem = new \phpbb\filesystem\filesystem();
$path_to_php = str_replace('\\', '/', dirname(__FILE__)) . '/templates/_dummy_include.php.inc';
$this->assertTrue($filesystem->is_absolute_path($path_to_php));
$this->assertTrue(\phpbb\storage\helper::is_absolute_path($path_to_php));
$template_text = "Path is absolute.\n<!-- INCLUDEPHP $path_to_php -->";
$cache_dir = $phpbb_root_path . 'cache/';

View File

@@ -39,7 +39,6 @@ class phpbb_template_allfolder_test extends phpbb_template_template_test_case
new \phpbb\symfony_request(
new phpbb_mock_request()
),
$filesystem,
$this->createMock('\phpbb\request\request'),
$phpbb_root_path,
$phpEx
@@ -59,7 +58,7 @@ class phpbb_template_allfolder_test extends phpbb_template_template_test_case
$container = new phpbb_mock_container_builder();
$cache_path = $phpbb_root_path . 'cache/twig';
$context = new \phpbb\template\context();
$loader = new \phpbb\template\twig\loader(new \phpbb\filesystem\filesystem(), '');
$loader = new \phpbb\template\twig\loader('');
$twig = new \phpbb\template\twig\environment(
$config,
$filesystem,

View File

@@ -144,7 +144,6 @@ Zeta test event in all',
new \phpbb\symfony_request(
new phpbb_mock_request()
),
new \phpbb\filesystem\filesystem(),
$this->createMock('\phpbb\request\request'),
$phpbb_root_path,
$phpEx
@@ -153,7 +152,7 @@ Zeta test event in all',
$container = new phpbb_mock_container_builder();
$cache_path = $phpbb_root_path . 'cache/twig';
$context = new \phpbb\template\context();
$loader = new \phpbb\template\twig\loader(new \phpbb\filesystem\filesystem(), '');
$loader = new \phpbb\template\twig\loader('');
$twig = new \phpbb\template\twig\environment(
$config,
$filesystem,

View File

@@ -34,7 +34,6 @@ class phpbb_template_template_includecss_test extends phpbb_template_template_te
new \phpbb\symfony_request(
new phpbb_mock_request()
),
$filesystem,
$this->createMock('\phpbb\request\request'),
$phpbb_root_path,
$phpEx
@@ -45,7 +44,7 @@ class phpbb_template_template_includecss_test extends phpbb_template_template_te
$container = new phpbb_mock_container_builder();
$cache_path = $phpbb_root_path . 'cache/twig';
$context = new \phpbb\template\context();
$loader = new \phpbb\template\twig\loader(new \phpbb\filesystem\filesystem(), '');
$loader = new \phpbb\template\twig\loader('');
$twig = new \phpbb\template\twig\environment(
$config,
$filesystem,

View File

@@ -86,8 +86,12 @@ class phpbb_template_template_test_case extends phpbb_test_case
new \phpbb\symfony_request(
new phpbb_mock_request()
),
<<<<<<< HEAD
$filesystem,
$this->createMock('\phpbb\request\request'),
=======
$this->getMock('\phpbb\request\request'),
>>>>>>> [ticket/15253] Use storage helper methods instead of filesystem methods
$phpbb_root_path,
$phpEx
);
@@ -97,7 +101,7 @@ class phpbb_template_template_test_case extends phpbb_test_case
$container = new phpbb_mock_container_builder();
$cache_path = $phpbb_root_path . 'cache/twig';
$context = new \phpbb\template\context();
$loader = new \phpbb\template\twig\loader(new \phpbb\filesystem\filesystem(), '');
$loader = new \phpbb\template\twig\loader('');
$twig = new \phpbb\template\twig\environment(
$config,
$filesystem,

View File

@@ -28,7 +28,6 @@ class phpbb_template_template_test_case_with_tree extends phpbb_template_templat
new \phpbb\symfony_request(
new phpbb_mock_request()
),
$filesystem,
$this->createMock('\phpbb\request\request'),
$phpbb_root_path,
$phpEx
@@ -40,7 +39,7 @@ class phpbb_template_template_test_case_with_tree extends phpbb_template_templat
$container = new phpbb_mock_container_builder();
$cache_path = $phpbb_root_path . 'cache/twig';
$context = new \phpbb\template\context();
$loader = new \phpbb\template\twig\loader(new \phpbb\filesystem\filesystem(), '');
$loader = new \phpbb\template\twig\loader('');
$twig = new \phpbb\template\twig\environment(
$config,
$filesystem,