mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-14 04:42:04 +02:00
[ticket/15392] Replace remaining dirname(__FILE__) with __DIR__
PHPBB3-15392
This commit is contained in:
parent
20d4a86016
commit
7a310cc7d9
@ -45,7 +45,7 @@ class phpbb_auth_provider_ldap_test extends phpbb_database_test_case
|
||||
|
||||
public function getDataSet()
|
||||
{
|
||||
return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/user.xml');
|
||||
return $this->createXMLDataSet(__DIR__ . '/fixtures/user.xml');
|
||||
}
|
||||
|
||||
/**
|
||||
|
2
tests/cache/file_driver_test.php
vendored
2
tests/cache/file_driver_test.php
vendored
@ -26,7 +26,7 @@ class phpbb_cache_file_driver_test extends phpbb_cache_common_test_case
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->cache_dir = dirname(__FILE__) . '/../tmp/cache/';
|
||||
$this->cache_dir = __DIR__ . '/../tmp/cache/';
|
||||
|
||||
if (file_exists($this->cache_dir))
|
||||
{
|
||||
|
4
tests/cache/memcached_test.php
vendored
4
tests/cache/memcached_test.php
vendored
@ -11,7 +11,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__) . '/common_test_case.php';
|
||||
require_once __DIR__ . '/common_test_case.php';
|
||||
|
||||
class phpbb_cache_memcached_driver_test extends \phpbb_cache_common_test_case
|
||||
{
|
||||
@ -19,7 +19,7 @@ class phpbb_cache_memcached_driver_test extends \phpbb_cache_common_test_case
|
||||
|
||||
public function getDataSet()
|
||||
{
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml');
|
||||
return $this->createXMLDataSet(__DIR__ . '/fixtures/config.xml');
|
||||
}
|
||||
|
||||
static public function setUpBeforeClass(): void
|
||||
|
2
tests/console/cache/purge_test.php
vendored
2
tests/console/cache/purge_test.php
vendored
@ -29,7 +29,7 @@ class phpbb_console_command_cache_purge_test extends phpbb_test_case
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
$this->cache_dir = dirname(__FILE__) . '/tmp/cache/';
|
||||
$this->cache_dir = __DIR__ . '/tmp/cache/';
|
||||
|
||||
if (file_exists($this->cache_dir))
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_database_test_
|
||||
|
||||
public function getDataSet()
|
||||
{
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/../fixtures/empty.xml');
|
||||
return $this->createXMLDataSet(__DIR__ . '/../fixtures/empty.xml');
|
||||
}
|
||||
|
||||
protected function setUp(): void
|
||||
|
@ -11,8 +11,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__) . '/ext/foo/bar/acp/acp_test_info.php';
|
||||
require_once dirname(__FILE__) . '/ext/foo/bar/ucp/ucp_test_info.php';
|
||||
require_once __DIR__ . '/ext/foo/bar/acp/acp_test_info.php';
|
||||
require_once __DIR__ . '/ext/foo/bar/ucp/ucp_test_info.php';
|
||||
|
||||
class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case
|
||||
{
|
||||
@ -43,7 +43,7 @@ class phpbb_dbal_migrator_tool_module_test extends phpbb_database_test_case
|
||||
$phpbb_log = new \phpbb\log\log($db, $user, $auth, $phpbb_dispatcher, $phpbb_root_path, 'adm/', $phpEx, LOG_TABLE);
|
||||
|
||||
// Correctly set the root path for this test to this directory, so the classes can be found
|
||||
$phpbb_root_path = dirname(__FILE__) . '/';
|
||||
$phpbb_root_path = __DIR__ . '/';
|
||||
|
||||
$phpbb_extension_manager = new phpbb_mock_extension_manager($phpbb_root_path);
|
||||
$module_manager = new \phpbb\module\module_manager($cache, $this->db, $phpbb_extension_manager, MODULES_TABLE, $phpbb_root_path, $phpEx);
|
||||
|
@ -26,7 +26,7 @@ namespace
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->phpbb_root_path = dirname(__FILE__) . '/';
|
||||
$this->phpbb_root_path = __DIR__ . '/';
|
||||
$this->config_php = new \phpbb\config_php_file($this->phpbb_root_path . 'fixtures/', 'php');
|
||||
|
||||
$this->filename = $this->phpbb_root_path . '../tmp/container.php';
|
||||
|
@ -11,7 +11,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__) . '/../../phpBB/includes/message_parser.php';
|
||||
require_once __DIR__ . '/../../phpBB/includes/message_parser.php';
|
||||
|
||||
class phpbb_functions_content_phpbb_format_quote_test extends phpbb_test_case
|
||||
{
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_user.php';
|
||||
require_once __DIR__ . '/../../phpBB/includes/functions_user.php';
|
||||
|
||||
class phpbb_functions_user_whois_test extends phpbb_test_case
|
||||
{
|
||||
|
@ -11,7 +11,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__) . '/helper_test_case.php';
|
||||
require_once __DIR__ . '/helper_test_case.php';
|
||||
|
||||
class phpbb_group_helper_get_name_string_test extends phpbb_group_helper_test_case
|
||||
{
|
||||
|
@ -11,7 +11,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__) . '/helper_test_case.php';
|
||||
require_once __DIR__ . '/helper_test_case.php';
|
||||
|
||||
class phpbb_group_helper_get_name_test extends phpbb_group_helper_test_case
|
||||
{
|
||||
|
@ -11,7 +11,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__) . '/helper_test_case.php';
|
||||
require_once __DIR__ . '/helper_test_case.php';
|
||||
|
||||
class phpbb_group_helper_get_rank_test extends phpbb_group_helper_test_case
|
||||
{
|
||||
|
@ -64,7 +64,7 @@ class get_callable_from_step_test extends phpbb_database_test_case
|
||||
|
||||
public function getDataSet()
|
||||
{
|
||||
return $this->createXMLDataSet(dirname(__FILE__).'/../dbal/fixtures/migrator.xml');
|
||||
return $this->createXMLDataSet(__DIR__ . '/../dbal/fixtures/migrator.xml');
|
||||
}
|
||||
|
||||
public function get_callable_from_step_provider()
|
||||
|
@ -15,7 +15,7 @@ use Symfony\Component\Config\FileLocator;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
||||
|
||||
require_once dirname(__FILE__) . '/base.php';
|
||||
require_once __DIR__ . '/base.php';
|
||||
|
||||
class notification_method_email_test extends phpbb_tests_notification_base
|
||||
{
|
||||
@ -24,7 +24,7 @@ class notification_method_email_test extends phpbb_tests_notification_base
|
||||
|
||||
public function getDataSet()
|
||||
{
|
||||
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/email_notification.type.post.xml');
|
||||
return $this->createXMLDataSet(__DIR__ . '/fixtures/email_notification.type.post.xml');
|
||||
}
|
||||
|
||||
protected function get_notification_methods()
|
||||
@ -257,7 +257,7 @@ class notification_method_email_test extends phpbb_tests_notification_base
|
||||
'post_username' => '',
|
||||
'forum_name' => '',
|
||||
],
|
||||
|
||||
|
||||
$post_data);
|
||||
$notification_options = [
|
||||
'item_id' => $post_data['post_id'],
|
||||
|
@ -11,7 +11,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__) . '/submit_post_base.php';
|
||||
require_once __DIR__ . '/submit_post_base.php';
|
||||
|
||||
class phpbb_notification_submit_post_type_forum_test extends phpbb_notification_submit_post_base
|
||||
{
|
||||
|
@ -36,7 +36,7 @@ class manager_test extends phpbb_database_test_case
|
||||
*/
|
||||
public function getDataSet()
|
||||
{
|
||||
return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/manager.xml');
|
||||
return $this->createXMLDataSet(__DIR__ . '/fixtures/manager.xml');
|
||||
}
|
||||
|
||||
protected function setUp(): void
|
||||
|
@ -11,9 +11,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
|
||||
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php';
|
||||
require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php';
|
||||
require_once __DIR__ . '/../../phpBB/includes/functions.php';
|
||||
require_once __DIR__ . '/../../phpBB/includes/functions_content.php';
|
||||
require_once __DIR__ . '/../../phpBB/includes/utf/utf_tools.php';
|
||||
|
||||
class phpbb_profilefield_type_url_test extends phpbb_test_case
|
||||
{
|
||||
|
@ -11,7 +11,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__) . '/template_test_case.php';
|
||||
require_once __DIR__ . '/template_test_case.php';
|
||||
|
||||
class phpbb_template_extension_test extends phpbb_template_template_test_case
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user