mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-21 16:22:22 +02:00
[ticket/10011] Tests can't be ran on PHP < 5.3
Apply the `__DIR__` fix to some remaining Ascraeus tests PHPBB3-10011
This commit is contained in:
parent
d06657c995
commit
2e54212309
@ -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
|
||||
{
|
||||
|
10
tests/cache/cache_test.php
vendored
10
tests/cache/cache_test.php
vendored
@ -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();
|
||||
|
||||
|
@ -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/';
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user