Skip to content
Snippets Groups Projects
Commit c868eb5b authored by Art4's avatar Art4
Browse files

Restore autoload for tests in autoload.php

parent 17344b88
No related merge requests found
......@@ -7,9 +7,20 @@ spl_autoload_register(function ($class) {
*/
$class = str_replace('\\', '/', $class);
// Check under the current directory
/* First, check under the current directory. It is important that
* we look here first, so that we don't waste time searching for
* test classes in the common case.
*/
$path = dirname(__FILE__).'/'.$class.'.php';
if (file_exists($path)) {
require_once $path;
}
/* If we didn't find what we're looking for already, maybe it's
* a test class?
*/
$path = dirname(__FILE__).'/../test/'.$class.'.php';
if (file_exists($path)) {
require_once $path;
}
});
......@@ -9,7 +9,7 @@
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="vendor/autoload.php"
bootstrap="lib/autoload.php"
>
<testsuites>
<testsuite name="php-redmine-api Test Suite">
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment