1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-11-26 20:35:21 +01:00

[feature/phpunit] Use SPL autoloading instead of manual loading.

This commit is contained in:
Andreas Fischer 2012-05-24 03:00:06 +02:00
parent d71d7f3496
commit 8571aa0bad
2 changed files with 9 additions and 2 deletions

View File

@ -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)

View File

@ -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');