diff --git a/tests/Math/BigIntegerTest.php b/tests/Math/BigIntegerTest.php index ad0badbc..2559fa51 100644 --- a/tests/Math/BigIntegerTest.php +++ b/tests/Math/BigIntegerTest.php @@ -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) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 35c9427f..eb7136b8 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -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');