Autoload namespaced test classes
This commit is contained in:
parent
e8d08d4930
commit
0ca5047da5
|
@ -105,6 +105,8 @@ class OC
|
||||||
$path = str_replace('\\', '/', $className) . '.php';
|
$path = str_replace('\\', '/', $className) . '.php';
|
||||||
} elseif (strpos($className, 'Test_') === 0) {
|
} elseif (strpos($className, 'Test_') === 0) {
|
||||||
$path = 'tests/lib/' . strtolower(str_replace('_', '/', substr($className, 5)) . '.php');
|
$path = 'tests/lib/' . strtolower(str_replace('_', '/', substr($className, 5)) . '.php');
|
||||||
|
} elseif (strpos($className, 'Test\\') === 0) {
|
||||||
|
$path = 'tests/lib/' . strtolower(str_replace('\\', '/', substr($className, 5)) . '.php');
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue