Skip to content

Commit

Permalink
[ticket/11045] Replaced __DIR__ with dirname(__FILE__)
Browse files Browse the repository at this point in the history
PHPBB3-11045
  • Loading branch information
Fyorl committed Sep 1, 2012
1 parent 94c9d70 commit 1520130
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/compress/compress_test.php
Expand Up @@ -7,9 +7,9 @@
*
*/

require_once __DIR__ . '/../../phpBB/includes/functions.php';
require_once __DIR__ . '/../../phpBB/includes/functions_admin.php';
require_once __DIR__ . '/../../phpBB/includes/functions_compress.php';
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_admin.php';
require_once dirname(__FILE__) . '/../../phpBB/includes/functions_compress.php';

class phpbb_compress_test extends phpbb_test_case
{
Expand Down Expand Up @@ -37,7 +37,7 @@ protected function setUp()
global $phpbb_root_path;
$phpbb_root_path = '';

$this->path = __DIR__ . '/fixtures/';
$this->path = dirname(__FILE__) . '/fixtures/';

if (!@extension_loaded('zlib') || !@extension_loaded('bz2'))
{
Expand All @@ -47,7 +47,7 @@ protected function setUp()

protected function tearDown()
{
foreach (array(__DIR__ . self::EXTRACT_DIR, __DIR__ . self::ARCHIVE_DIR) as $dir)
foreach (array(dirname(__FILE__) . self::EXTRACT_DIR, dirname(__FILE__) . self::ARCHIVE_DIR) as $dir)
{
$this->clear_dir($dir);
}
Expand Down Expand Up @@ -101,7 +101,7 @@ protected function valid_extraction($extra = array())

foreach ($filelist as $filename)
{
$path = __DIR__ . self::EXTRACT_DIR . $filename;
$path = dirname(__FILE__) . self::EXTRACT_DIR . $filename;
$this->assertTrue(file_exists($path));

// Check the file's contents is correct
Expand Down Expand Up @@ -143,7 +143,7 @@ public function test_extract_zip()
*/
public function test_compress_tar($filename, $type)
{
$tar = __DIR__ . self::ARCHIVE_DIR . $filename;
$tar = dirname(__FILE__) . self::ARCHIVE_DIR . $filename;
$compress = new compress_tar('w', $tar);
$this->archive_files($compress);
$compress->close();
Expand All @@ -160,7 +160,7 @@ public function test_compress_tar($filename, $type)
*/
public function test_compress_zip()
{
$zip = __DIR__ . self::ARCHIVE_DIR . 'archive.zip';
$zip = dirname(__FILE__) . self::ARCHIVE_DIR . 'archive.zip';
$compress = new compress_zip('w', $zip);
$this->archive_files($compress);
$compress->close();
Expand Down

0 comments on commit 1520130

Please sign in to comment.