mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-22 08:13:14 +02:00
[ticket/11832] Fix INCLUDE(JS/CSS)
PHPBB3-11832
This commit is contained in:
@@ -49,7 +49,14 @@ class phpbb_controller_helper_url_test extends phpbb_test_case
|
||||
|
||||
$phpbb_dispatcher = new phpbb_mock_event_dispatcher;
|
||||
$this->user = $this->getMock('phpbb_user');
|
||||
$this->template = new phpbb_template_twig($phpbb_root_path, $phpEx, $config, $this->user, new phpbb_template_context());
|
||||
$phpbb_filesystem = new phpbb_filesystem(
|
||||
new phpbb_symfony_request(
|
||||
new phpbb_mock_request()
|
||||
),
|
||||
$phpbb_root_path,
|
||||
$phpEx
|
||||
);
|
||||
$this->template = new phpbb_template_twig($phpbb_filesystem, $config, $this->user, new phpbb_template_context());
|
||||
|
||||
// We don't use mod_rewrite in these tests
|
||||
$config = new phpbb_config(array('enable_mod_rewrite' => '0'));
|
||||
@@ -94,7 +101,14 @@ class phpbb_controller_helper_url_test extends phpbb_test_case
|
||||
|
||||
$phpbb_dispatcher = new phpbb_mock_event_dispatcher;
|
||||
$this->user = $this->getMock('phpbb_user');
|
||||
$this->template = new phpbb_template_twig($phpbb_root_path, $phpEx, $config, $this->user, new phpbb_template_context());
|
||||
$phpbb_filesystem = new phpbb_filesystem(
|
||||
new phpbb_symfony_request(
|
||||
new phpbb_mock_request()
|
||||
),
|
||||
$phpbb_root_path,
|
||||
$phpEx
|
||||
);
|
||||
$this->template = new phpbb_template_twig($phpbb_filesystem, $config, $this->user, new phpbb_template_context());
|
||||
|
||||
$config = new phpbb_config(array('enable_mod_rewrite' => '1'));
|
||||
$helper = new phpbb_controller_helper($this->template, $this->user, $config, '', 'php');
|
||||
|
@@ -63,7 +63,8 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
|
||||
new phpbb_symfony_request(
|
||||
new phpbb_mock_request()
|
||||
),
|
||||
dirname(__FILE__) . '/../../phpBB/'
|
||||
dirname(__FILE__) . '/../../phpBB/',
|
||||
'php'
|
||||
),
|
||||
'phpbb_ext',
|
||||
dirname(__FILE__) . '/../../phpBB/',
|
||||
|
@@ -118,7 +118,8 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
|
||||
new phpbb_symfony_request(
|
||||
new phpbb_mock_request()
|
||||
),
|
||||
$phpbb_root_path
|
||||
$phpbb_root_path,
|
||||
$php_ext
|
||||
),
|
||||
'phpbb_ext',
|
||||
dirname(__FILE__) . '/',
|
||||
|
@@ -41,8 +41,13 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
|
||||
$this->table_prefix = 'phpbb_';
|
||||
|
||||
$this->template = new phpbb_template_twig(
|
||||
$this->phpbb_root_path,
|
||||
$this->phpEx,
|
||||
new phpbb_filesystem(
|
||||
new phpbb_symfony_request(
|
||||
new phpbb_mock_request()
|
||||
),
|
||||
$this->phpbb_root_path,
|
||||
$this->phpEx
|
||||
),
|
||||
$this->config,
|
||||
$this->user,
|
||||
new phpbb_template_context()
|
||||
@@ -69,7 +74,8 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
|
||||
new phpbb_symfony_request(
|
||||
new phpbb_mock_request()
|
||||
),
|
||||
$this->phpbb_root_path
|
||||
$this->phpbb_root_path,
|
||||
$this->phpEx
|
||||
),
|
||||
'phpbb_ext',
|
||||
$this->phpbb_root_path,
|
||||
|
@@ -18,7 +18,8 @@ class phpbb_filesystem_clean_path_test extends phpbb_test_case
|
||||
new phpbb_symfony_request(
|
||||
new phpbb_mock_request()
|
||||
),
|
||||
dirname(__FILE__) . './../../phpBB/'
|
||||
dirname(__FILE__) . './../../phpBB/',
|
||||
'php'
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -18,8 +18,13 @@ class phpbb_filesystem_web_root_path_test extends phpbb_test_case
|
||||
|
||||
$this->set_phpbb_root_path();
|
||||
|
||||
$symfony_request = new phpbb_symfony_request(new phpbb_mock_request());
|
||||
$this->filesystem = new phpbb_filesystem($symfony_request, $this->phpbb_root_path);
|
||||
$this->filesystem = new phpbb_filesystem(
|
||||
new phpbb_symfony_request(
|
||||
new phpbb_mock_request()
|
||||
),
|
||||
$this->phpbb_root_path,
|
||||
'php'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -126,7 +131,11 @@ class phpbb_filesystem_web_root_path_test extends phpbb_test_case
|
||||
->method('getScriptName')
|
||||
->will($this->returnValue($getScriptName));
|
||||
|
||||
$filesystem = new phpbb_filesystem($symfony_request, $this->phpbb_root_path);
|
||||
$filesystem = new phpbb_filesystem(
|
||||
$symfony_request,
|
||||
$this->phpbb_root_path,
|
||||
'php'
|
||||
);
|
||||
|
||||
$this->assertEquals($expected, $filesystem->update_web_root_path($input, $symfony_request));
|
||||
}
|
||||
|
@@ -18,7 +18,8 @@ class phpbb_mock_extension_manager extends phpbb_extension_manager
|
||||
new phpbb_symfony_request(
|
||||
new phpbb_mock_request()
|
||||
),
|
||||
$phpbb_root_path
|
||||
$this->phpbb_root_path,
|
||||
$this->php_ext
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -116,7 +116,14 @@ Zeta test event in all',
|
||||
$this->extension_manager = new phpbb_mock_filesystem_extension_manager(
|
||||
dirname(__FILE__) . "/datasets/$dataset/"
|
||||
);
|
||||
$this->template = new phpbb_template_twig($phpbb_root_path, $phpEx, $config, $user, new phpbb_template_context, $this->extension_manager);
|
||||
$phpbb_filesystem = new phpbb_filesystem(
|
||||
new phpbb_symfony_request(
|
||||
new phpbb_mock_request()
|
||||
),
|
||||
$phpbb_root_path,
|
||||
$phpEx
|
||||
);
|
||||
$this->template = new phpbb_template_twig($phpbb_filesystem, $config, $user, new phpbb_template_context, $this->extension_manager);
|
||||
$this->template->set_custom_style(((!empty($style_names)) ? $style_names : 'silver'), array($this->template_path));
|
||||
}
|
||||
}
|
||||
|
@@ -63,8 +63,16 @@ class phpbb_template_template_test_case extends phpbb_test_case
|
||||
$config = new phpbb_config(array_merge($defaults, $new_config));
|
||||
$this->user = new phpbb_user;
|
||||
|
||||
$phpbb_filesystem = new phpbb_filesystem(
|
||||
new phpbb_symfony_request(
|
||||
new phpbb_mock_request()
|
||||
),
|
||||
$phpbb_root_path,
|
||||
$phpEx
|
||||
);
|
||||
|
||||
$this->template_path = $this->test_path . '/templates';
|
||||
$this->template = new phpbb_template_twig($phpbb_root_path, $phpEx, $config, $this->user, new phpbb_template_context());
|
||||
$this->template = new phpbb_template_twig($phpbb_filesystem, $config, $this->user, new phpbb_template_context());
|
||||
$this->template->set_custom_style('tests', $this->template_path);
|
||||
}
|
||||
|
||||
|
@@ -18,9 +18,17 @@ class phpbb_template_template_test_case_with_tree extends phpbb_template_templat
|
||||
$defaults = $this->config_defaults();
|
||||
$config = new phpbb_config(array_merge($defaults, $new_config));
|
||||
|
||||
$phpbb_filesystem = new phpbb_filesystem(
|
||||
new phpbb_symfony_request(
|
||||
new phpbb_mock_request()
|
||||
),
|
||||
$phpbb_root_path,
|
||||
$phpEx
|
||||
);
|
||||
|
||||
$this->template_path = $this->test_path . '/templates';
|
||||
$this->parent_template_path = $this->test_path . '/parent_templates';
|
||||
$this->template = new phpbb_template_twig($phpbb_root_path, $phpEx, $config, $user, new phpbb_template_context());
|
||||
$this->template = new phpbb_template_twig($phpbb_filesystem, $config, $user, new phpbb_template_context());
|
||||
$this->template->set_custom_style('tests', array($this->template_path, $this->parent_template_path));
|
||||
}
|
||||
}
|
||||
|
@@ -207,7 +207,8 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||
new phpbb_symfony_request(
|
||||
new phpbb_mock_request()
|
||||
),
|
||||
$phpbb_root_path
|
||||
$phpbb_root_path,
|
||||
$php_ext
|
||||
),
|
||||
self::$config['table_prefix'] . 'ext',
|
||||
dirname(__FILE__) . '/',
|
||||
|
Reference in New Issue
Block a user