diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bbcode/parser_test.php | 4 | ||||
-rw-r--r-- | tests/cache/cache_test.php | 10 | ||||
-rw-r--r-- | tests/class_loader/class_loader_test.php | 6 | ||||
-rw-r--r-- | tests/config/db_test.php | 4 | ||||
-rw-r--r-- | tests/download/http_byte_range_test.php | 2 | ||||
-rw-r--r-- | tests/network/inet_ntop_pton_test.php | 2 | ||||
-rw-r--r-- | tests/network/ip_normalise_test.php | 2 | ||||
-rw-r--r-- | tests/request/type_cast_helper_test.php | 2 |
8 files changed, 16 insertions, 16 deletions
diff --git a/tests/bbcode/parser_test.php b/tests/bbcode/parser_test.php index 4a11f47680..9423383938 100644 --- a/tests/bbcode/parser_test.php +++ b/tests/bbcode/parser_test.php @@ -8,8 +8,8 @@ * */ -// require_once __DIR__ . '/../../phpBB/includes/bbcode/bbcode_parser_base.php'; -// require_once __DIR__ . '/../../phpBB/includes/bbcode/bbcode_parser.php'; +// require_once dirname(__FILE__) . '/../../phpBB/includes/bbcode/bbcode_parser_base.php'; +// require_once dirname(__FILE__) . '/../../phpBB/includes/bbcode/bbcode_parser.php'; class phpbb_bbcode_parser_test extends PHPUnit_Framework_TestCase { diff --git a/tests/cache/cache_test.php b/tests/cache/cache_test.php index 525b2da909..2f11267cba 100644 --- a/tests/cache/cache_test.php +++ b/tests/cache/cache_test.php @@ -7,25 +7,25 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; class phpbb_cache_test extends phpbb_test_case { protected function tearDown() { - $iterator = new DirectoryIterator(__DIR__ . '/tmp'); + $iterator = new DirectoryIterator(dirname(__FILE__) . '/tmp'); foreach ($iterator as $file) { - if (is_file(__DIR__ . '/tmp/' . $file) && $file != '.gitkeep') + if (is_file(dirname(__FILE__) . '/tmp/' . $file) && $file != '.gitkeep') { - unlink(__DIR__ . '/tmp/' . $file); + unlink(dirname(__FILE__) . '/tmp/' . $file); } } } public function test_cache_driver_file() { - $driver = new phpbb_cache_driver_file(__DIR__ . '/tmp/'); + $driver = new phpbb_cache_driver_file(dirname(__FILE__) . '/tmp/'); $driver->put('test_key', 'test_value'); $driver->save(); diff --git a/tests/class_loader/class_loader_test.php b/tests/class_loader/class_loader_test.php index cc6862dc70..0c7fe3f97a 100644 --- a/tests/class_loader/class_loader_test.php +++ b/tests/class_loader/class_loader_test.php @@ -7,7 +7,7 @@ * */ -require_once __DIR__ . '/../mock/cache.php'; +require_once dirname(__FILE__) . '/../mock/cache.php'; class phpbb_class_loader_test extends PHPUnit_Framework_TestCase { @@ -25,7 +25,7 @@ class phpbb_class_loader_test extends PHPUnit_Framework_TestCase public function test_resolve_path() { - $prefix = __DIR__ . '/'; + $prefix = dirname(__FILE__) . '/'; $class_loader = new phpbb_class_loader($prefix); $prefix .= 'includes/'; @@ -63,7 +63,7 @@ class phpbb_class_loader_test extends PHPUnit_Framework_TestCase $cacheMap = array('class_loader' => array('phpbb_a_cached_name' => 'a/cached_name')); $cache = new phpbb_mock_cache($cacheMap); - $prefix = __DIR__ . '/'; + $prefix = dirname(__FILE__) . '/'; $class_loader = new phpbb_class_loader($prefix, '.php', $cache); $prefix .= 'includes/'; diff --git a/tests/config/db_test.php b/tests/config/db_test.php index e291c05c8f..e0d5252f19 100644 --- a/tests/config/db_test.php +++ b/tests/config/db_test.php @@ -7,7 +7,7 @@ * */ -require_once __DIR__ . '/../mock/cache.php'; +require_once dirname(__FILE__) . '/../mock/cache.php'; class phpbb_config_db_test extends phpbb_database_test_case { @@ -17,7 +17,7 @@ class phpbb_config_db_test extends phpbb_database_test_case public function getDataSet() { - return $this->createXMLDataSet(__DIR__ . '/fixtures/config.xml'); + return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml'); } public function setUp() diff --git a/tests/download/http_byte_range_test.php b/tests/download/http_byte_range_test.php index 4f14746bef..ba2caee192 100644 --- a/tests/download/http_byte_range_test.php +++ b/tests/download/http_byte_range_test.php @@ -7,7 +7,7 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/functions_download.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions_download.php'; class phpbb_download_http_byte_range_test extends phpbb_test_case { diff --git a/tests/network/inet_ntop_pton_test.php b/tests/network/inet_ntop_pton_test.php index 7d4f44aaca..d3332f20c0 100644 --- a/tests/network/inet_ntop_pton_test.php +++ b/tests/network/inet_ntop_pton_test.php @@ -7,7 +7,7 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; class phpbb_network_inet_ntop_pton_test extends phpbb_test_case { diff --git a/tests/network/ip_normalise_test.php b/tests/network/ip_normalise_test.php index c10ea6e088..dce0774d85 100644 --- a/tests/network/ip_normalise_test.php +++ b/tests/network/ip_normalise_test.php @@ -7,7 +7,7 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/functions.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; class phpbb_network_ip_normalise_test extends phpbb_test_case { diff --git a/tests/request/type_cast_helper_test.php b/tests/request/type_cast_helper_test.php index 6d4e7055d5..06cf2e1bf6 100644 --- a/tests/request/type_cast_helper_test.php +++ b/tests/request/type_cast_helper_test.php @@ -8,7 +8,7 @@ * */ -require_once __DIR__ . '/../../phpBB/includes/utf/utf_tools.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/utf/utf_tools.php'; class phpbb_type_cast_helper_test extends phpbb_test_case { |