summaryrefslogtreecommitdiffstats
path: root/test/unit/bootstrap.php
blob: 8b4e24a9a49e9e0c5fcfa3723ec90219776baff1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
include(dirname(dirname(__FILE__)) . '/../lib/client.php');
include(dirname(dirname(__FILE__)) . '/../lib/config.php');
require __DIR__ . '/../../vendor/autoload.php';
function autoload_tests($class)
{
    if (strpos($class, 'PHPHTTPClientTest_') !== 0) {
        return;
    }
    $class = substr($class, 13);
    $file = str_replace('_', '/', $class);
    if (file_exists(dirname(__FILE__) . '/' . $file . '.php')) {
        require_once(dirname(__FILE__) . '/' . $file . '.php');
    }
}
spl_autoload_register('autoload_tests');
?>