https://github.com/phpseclib/phpseclib/tree/master/tests
My familiarity with phpunit is pretty lacking. How do I run those tests? I installed phpunit using the following commands (per this website ):
pear config-set auto_discover 1
pear install pear.phpunit.de/PHPUnit
I try doing phpunit MD5Test
from the tests/Crypt/Hash directory and get the following:
PHP Fatal error: Class 'Crypt_Hash_TestCase' not found in /root/phpseclib/trunk/tests/Crypt/Hash/MD5Test.php on line 9
That's not too surprising since Crypt_Hash_TestCase isn't included anywhere. There's a bootstrap.php file but I don't know how to use that either.
Run phpunit from this directory: https://github.com/phpseclib/phpseclib The clue is that that is where the the phpunit.xml.dist file is found.
To run all tests you start it with simply:
phpunit
If you just want to run the MD5Test tests then (still from that same root directory):
phpunit tests/Crypt/Hash/MD5Test.php
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.