aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cache/cache_test.php
diff options
context:
space:
mode:
authorErik Frèrejean <erikfrerejean@phpbb.com>2011-01-31 13:54:55 +0100
committerErik Frèrejean <erikfrerejean@phpbb.com>2011-01-31 14:02:30 +0100
commit2e5421230968170477b7fbadd58c01b26ade0590 (patch)
tree9fb11cc9cd70ec6becc51391a160de4057e42a49 /tests/cache/cache_test.php
parentd06657c99573e3975e735e8cb7f8cc5ccb510851 (diff)
downloadforums-2e5421230968170477b7fbadd58c01b26ade0590.tar
forums-2e5421230968170477b7fbadd58c01b26ade0590.tar.gz
forums-2e5421230968170477b7fbadd58c01b26ade0590.tar.bz2
forums-2e5421230968170477b7fbadd58c01b26ade0590.tar.xz
forums-2e5421230968170477b7fbadd58c01b26ade0590.zip
[ticket/10011] Tests can't be ran on PHP < 5.3
Apply the `__DIR__` fix to some remaining Ascraeus tests PHPBB3-10011
Diffstat (limited to 'tests/cache/cache_test.php')
-rw-r--r--tests/cache/cache_test.php10
1 files changed, 5 insertions, 5 deletions
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();