phpunit and autoloader [closed]
I'm trying to use autoloader with phpunit this way:
- in phpunit.xml I put
bootstrap="bootstrap.php"
in bootstrap.php I put
define( 'TESTING', true ); putenv( 'APPLICATION_ENV=testing' ); function __autoload($className) { include_once __autoloadFilename($className); } function __autoloa开发者_StackOverflow社区dFilename($className) { return str_replace('_','/',$className).".php"; }
When trying to run phpunit command i get error:
Generating code coverage report, this may take a moment.
Fatal error: Method PEAR_Autoloader::__call() must take exactly 2 arguments in /usr/share/php/PEAR/Autoloader.php on line 211
Thank you for any help.
精彩评论