Skip to content

Commit 794bce9

Browse files
authored
Merge pull request #96 from puggan/bugfix/travis
avoid chdir(), use __DIR__ instead
2 parents a3068e3 + c115697 commit 794bce9

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

tests/bootstrap.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
}
77

88
error_reporting(E_ALL | E_STRICT);
9-
chdir(__DIR__);
109

11-
require('classBootstrap.php');
10+
require(__DIR__ . '/classBootstrap.php');
1211

1312
Bootstrap::init();

tests/classBootstrap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ protected static function initAutoloader()
1616
spl_autoload_register(
1717
function ($className) {
1818
$path = str_replace('\\', '/', $className);
19-
if (file_exists('../src/' . $path . '.php')) {
20-
include_once '../src/' . $path . '.php';
19+
if (file_exists(__DIR__ . '/../src/' . $path . '.php')) {
20+
include_once __DIR__ . '/../src/' . $path . '.php';
2121
}
2222
}
2323
);

0 commit comments

Comments
 (0)