summaryrefslogtreecommitdiffstats
path: root/tests/mocks/autoloader.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-01-14 08:54:58 +0100
committerAndrey Andreev <narf@devilix.net>2014-01-14 08:54:58 +0100
commit7892699d9da713a94a77f3cd949f71aa60ca7c06 (patch)
treefcb401cf340d5ef625ae245014000922464e7cde /tests/mocks/autoloader.php
parent3559af1723920007598e5dd44abbb9f581879a36 (diff)
parent9765472d1388c631ad57f4bd0dd4dd424f79e5e0 (diff)
Merge pull request #2815 from fredemmott/fix-hhvm
Don't throw in mock autoloader
Diffstat (limited to 'tests/mocks/autoloader.php')
-rw-r--r--tests/mocks/autoloader.php16
1 files changed, 1 insertions, 15 deletions
diff --git a/tests/mocks/autoloader.php b/tests/mocks/autoloader.php
index 3d216da1f..cc0a2e2f7 100644
--- a/tests/mocks/autoloader.php
+++ b/tests/mocks/autoloader.php
@@ -89,21 +89,7 @@ function autoload($class)
if ( ! file_exists($file))
{
- $trace = debug_backtrace();
-
- if ($trace[2]['function'] === 'class_exists' OR $trace[2]['function'] === 'file_exists')
- {
- // If the autoload call came from `class_exists` or `file_exists`,
- // we skipped and return FALSE
- return FALSE;
- }
- elseif (($autoloader = spl_autoload_functions()) && end($autoloader) !== __FUNCTION__)
- {
- // If there was other custom autoloader, passed away
- return FALSE;
- }
-
- throw new InvalidArgumentException("Unable to load {$class}.");
+ return FALSE;
}
include_once($file);