2012-05-24 00:09:54 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Bootstrapping File for phpseclib Test Suite
|
|
|
|
*
|
2014-02-15 18:57:49 +00:00
|
|
|
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
2012-05-24 00:09:54 +00:00
|
|
|
*/
|
|
|
|
|
2013-11-29 08:22:08 +00:00
|
|
|
date_default_timezone_set('UTC');
|
|
|
|
|
2012-05-24 00:09:54 +00:00
|
|
|
// Set up include path accordingly. This is especially required because some
|
|
|
|
// class files of phpseclib require() other dependencies.
|
|
|
|
set_include_path(implode(PATH_SEPARATOR, array(
|
2014-02-15 18:57:49 +00:00
|
|
|
dirname(__FILE__) . '/../phpseclib/',
|
|
|
|
dirname(__FILE__) . '/',
|
|
|
|
get_include_path(),
|
2012-05-24 00:09:54 +00:00
|
|
|
)));
|
2012-05-24 01:00:06 +00:00
|
|
|
|
2014-06-17 12:38:24 +00:00
|
|
|
require_once 'Crypt/Random.php';
|
2013-01-03 17:43:08 +00:00
|
|
|
|
2012-05-24 01:00:06 +00:00
|
|
|
function phpseclib_autoload($class)
|
|
|
|
{
|
2014-02-15 18:57:49 +00:00
|
|
|
$file = str_replace('_', '/', $class) . '.php';
|
2012-05-24 01:00:06 +00:00
|
|
|
|
2014-06-19 00:30:08 +00:00
|
|
|
if (phpseclib_resolve_include_path($file)) {
|
2014-02-15 18:57:49 +00:00
|
|
|
// @codingStandardsIgnoreStart
|
|
|
|
require $file;
|
|
|
|
// @codingStandardsIgnoreEnd
|
|
|
|
}
|
2012-05-24 01:00:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
spl_autoload_register('phpseclib_autoload');
|