开发者

phpunit and autoloader [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 10 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜