2012-06-11 11:06:19 +04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
2012-06-11 11:39:12 +04:00
|
|
|
* This file is part of the Fetch library.
|
2012-06-11 11:06:19 +04:00
|
|
|
*
|
|
|
|
* (c) Robert Hafner <tedivm@tedivm.com>
|
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
|
|
|
|
|
|
|
define('TESTING', true);
|
|
|
|
|
|
|
|
error_reporting(-1);
|
|
|
|
|
|
|
|
spl_autoload_register(function($class) {
|
|
|
|
if (0 === strpos($class, 'Fetch\\Test\\')) {
|
|
|
|
$file = __DIR__ . '/../tests/' . str_replace('\\', '/', $class) . '.php';
|
|
|
|
if (file_exists($file)) {
|
|
|
|
require_once $file;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
} elseif (0 === strpos($class, 'Fetch\\')) {
|
|
|
|
$file = __DIR__ . '/../src/' . str_replace('\\', '/', $class) . '.php';
|
|
|
|
if (file_exists($file)) {
|
|
|
|
require_once $file;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|