mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-16 10:15:14 +00:00
[feature/phpunit] Use SPL autoloading instead of manual loading.
This commit is contained in:
parent
d71d7f3496
commit
8571aa0bad
@ -5,8 +5,6 @@
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
*/
|
||||
|
||||
require('Math/BigInteger.php');
|
||||
|
||||
class BigIntegerTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function getInstance($x = 0, $base = 10)
|
||||
|
@ -11,3 +11,12 @@ set_include_path(implode(PATH_SEPARATOR, array(
|
||||
dirname(__FILE__) . '/../phpseclib/',
|
||||
get_include_path(),
|
||||
)));
|
||||
|
||||
function phpseclib_autoload($class)
|
||||
{
|
||||
$file = str_replace('_', '/', $class) . '.php';
|
||||
|
||||
require $file;
|
||||
}
|
||||
|
||||
spl_autoload_register('phpseclib_autoload');
|
||||
|
Loading…
Reference in New Issue
Block a user