diff options
author | Elmer Thomas <elmer@thinkingserious.com> | 2016-03-19 21:23:33 -0700 |
---|---|---|
committer | Elmer Thomas <elmer@thinkingserious.com> | 2016-03-19 21:23:33 -0700 |
commit | e5ab6e0e867f58452dbdd03ee0469c48c9c841fe (patch) | |
tree | 581f5c5b52645105218cee6fa5923cd88217c8a0 /test/unit/bootstrap.php | |
parent | af6fd06aa21cebb7ac601abfc130db137bb705e5 (diff) | |
download | php-http-client-e5ab6e0e867f58452dbdd03ee0469c48c9c841fe.zip php-http-client-e5ab6e0e867f58452dbdd03ee0469c48c9c841fe.tar.gz php-http-client-e5ab6e0e867f58452dbdd03ee0469c48c9c841fe.tar.bz2 |
Add Tests
Diffstat (limited to 'test/unit/bootstrap.php')
-rw-r--r-- | test/unit/bootstrap.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/unit/bootstrap.php b/test/unit/bootstrap.php new file mode 100644 index 0000000..af10b46 --- /dev/null +++ b/test/unit/bootstrap.php @@ -0,0 +1,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'); +?>
\ No newline at end of file |