1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 11:44:08 +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:
Erik Frèrejean
2011-01-31 13:54:55 +01:00
parent d06657c995
commit 2e54212309
8 changed files with 16 additions and 16 deletions

View File

@@ -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();