diff options
Diffstat (limited to 'tests/template')
-rw-r--r-- | tests/template/includephp_test.php | 3 | ||||
-rw-r--r-- | tests/template/template_allfolder_test.php | 4 | ||||
-rw-r--r-- | tests/template/template_events_test.php | 4 | ||||
-rw-r--r-- | tests/template/template_includecss_test.php | 4 | ||||
-rw-r--r-- | tests/template/template_test_case.php | 8 | ||||
-rw-r--r-- | tests/template/template_test_case_with_tree.php | 4 |
6 files changed, 16 insertions, 11 deletions
diff --git a/tests/template/includephp_test.php b/tests/template/includephp_test.php index fdddbef4f2..722e10e42d 100644 --- a/tests/template/includephp_test.php +++ b/tests/template/includephp_test.php @@ -39,8 +39,9 @@ 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(phpbb_is_absolute($path_to_php)); + $this->assertTrue($filesystem->is_absolute_path($path_to_php)); $template_text = "Path is absolute.\n<!-- INCLUDEPHP $path_to_php -->"; $cache_dir = $phpbb_root_path . 'cache/'; diff --git a/tests/template/template_allfolder_test.php b/tests/template/template_allfolder_test.php index e87688a57c..f739a78d84 100644 --- a/tests/template/template_allfolder_test.php +++ b/tests/template/template_allfolder_test.php @@ -34,7 +34,7 @@ class phpbb_template_allfolder_test extends phpbb_template_template_test_case new \phpbb\symfony_request( new phpbb_mock_request() ), - new \phpbb\filesystem(), + new \phpbb\filesystem\filesystem(), $this->getMock('\phpbb\request\request'), $phpbb_root_path, $phpEx @@ -54,7 +54,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(''); + $loader = new \phpbb\template\twig\loader(new \phpbb\filesystem\filesystem(), ''); $twig = new \phpbb\template\twig\environment( $config, $path_helper, diff --git a/tests/template/template_events_test.php b/tests/template/template_events_test.php index e8ffea8d11..6d1b7253e3 100644 --- a/tests/template/template_events_test.php +++ b/tests/template/template_events_test.php @@ -142,7 +142,7 @@ Zeta test event in all', new \phpbb\symfony_request( new phpbb_mock_request() ), - new \phpbb\filesystem(), + new \phpbb\filesystem\filesystem(), $this->getMock('\phpbb\request\request'), $phpbb_root_path, $phpEx @@ -151,7 +151,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(''); + $loader = new \phpbb\template\twig\loader(new \phpbb\filesystem\filesystem(), ''); $twig = new \phpbb\template\twig\environment( $config, $path_helper, diff --git a/tests/template/template_includecss_test.php b/tests/template/template_includecss_test.php index 96980e17c6..7a73d1f888 100644 --- a/tests/template/template_includecss_test.php +++ b/tests/template/template_includecss_test.php @@ -32,7 +32,7 @@ class phpbb_template_template_includecss_test extends phpbb_template_template_te new \phpbb\symfony_request( new phpbb_mock_request() ), - new \phpbb\filesystem(), + new \phpbb\filesystem\filesystem(), $this->getMock('\phpbb\request\request'), $phpbb_root_path, $phpEx @@ -43,7 +43,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(''); + $loader = new \phpbb\template\twig\loader(new \phpbb\filesystem\filesystem(), ''); $twig = new \phpbb\template\twig\environment( $config, $this->phpbb_path_helper, diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php index f9ea8cfaba..29ff669efc 100644 --- a/tests/template/template_test_case.php +++ b/tests/template/template_test_case.php @@ -71,7 +71,7 @@ class phpbb_template_template_test_case extends phpbb_test_case new \phpbb\symfony_request( new phpbb_mock_request() ), - new \phpbb\filesystem(), + new \phpbb\filesystem\filesystem(), $this->getMock('\phpbb\request\request'), $phpbb_root_path, $phpEx @@ -82,7 +82,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(''); + $loader = new \phpbb\template\twig\loader(new \phpbb\filesystem\filesystem(), ''); $twig = new \phpbb\template\twig\environment( $config, $path_helper, @@ -108,6 +108,10 @@ class phpbb_template_template_test_case extends phpbb_test_case $this->setup_engine(); $this->template->clear_cache(); + + global $phpbb_filesystem; + + $phpbb_filesystem = new \phpbb\filesystem\filesystem(); } protected function tearDown() diff --git a/tests/template/template_test_case_with_tree.php b/tests/template/template_test_case_with_tree.php index c634e2051a..eab83f379a 100644 --- a/tests/template/template_test_case_with_tree.php +++ b/tests/template/template_test_case_with_tree.php @@ -26,7 +26,7 @@ class phpbb_template_template_test_case_with_tree extends phpbb_template_templat new \phpbb\symfony_request( new phpbb_mock_request() ), - new \phpbb\filesystem(), + new \phpbb\filesystem\filesystem(), $this->getMock('\phpbb\request\request'), $phpbb_root_path, $phpEx @@ -38,7 +38,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(''); + $loader = new \phpbb\template\twig\loader(new \phpbb\filesystem\filesystem(), ''); $twig = new \phpbb\template\twig\environment( $config, $this->phpbb_path_helper, |