• 技术文章 >后端开发 >php教程

    手动装配phpunit

    2016-06-13 11:06:56原创401
    手动安装phpunit

    在ubuntu12.04下面phpunit报错

    PHP Fatal error:  Call to undefined method PHP_CodeCoverage_Filter::getInstance() in /usr/share/php/PHPUnit/Framework.php on line 46

    $ pear config-showWhich showed this (unlike my config-show):Configuration (channel pear.php.net):=====================================Auto-discover new Channels auto_discover Default Channel default_channel pear.php.netHTTP Proxy Server Address http_proxy PEAR server [DEPRECATED] master_server pear.php.netDefault Channel Mirror preferred_mirror pear.php.netRemote Configuration File remote_config PEAR executables directory bin_dir /usr/binPEAR documentation directory doc_dir /usr/share/php/docPHP extension directory ext_dir /usr/lib/php5/20090626+lfsPEAR directory php_dir /usr/share/phpPEAR Installer cache directory cache_dir /tmp/pear/cachePEAR configuration file cfg_dir /usr/share/php/cfgdirectoryPEAR data directory data_dir /usr/share/php/dataPEAR Installer download download_dir /build/buildd/php5-5.3.10/pear-build-downloaddirectoryPHP CLI/CGI binary php_bin /usr/bin/phpphp.ini location php_ini --program-prefix passed to php_prefix PHP’s ./configure--program-suffix passed to php_suffix PHP’s ./configurePEAR Installer temp directory temp_dir /tmp/pear/tempPEAR test directory test_dir /usr/share/php/testPEAR www files directory www_dir /usr/share/php/htdocsCache TimeToLive cache_ttl 3600Preferred Package State preferred_state stableUnix file mask umask 2Debug Log Level verbose 1PEAR password (for password maintainers)Signature Handling Program sig_bin /usr/bin/gpgSignature Key Directory sig_keydir /etc/pear/pearkeysSignature Key Id sig_keyid Package Signature Type sig_type gpgPEAR username (for username maintainers)User Configuration File Filename /home/username/.pearrcSystem Configuration File Filename /etc/pear/pear.confYou need to set following configurations:sudo pear config-set bin_dir /usr/binsudo pear config-set doc_dir /usr/share/php/docsudo pear config-set php_dir /usr/share/phpsudo pear config-set cfg_dir /usr/share/php/cfg (make (sudo mkdir cfg) directory here)sudo pear config-set data_dir /usr/share/php/datasudo pear config-set test_dir /usr/share/php/test


    sudo apt-get install gitmkdir phpunit && cd phpunitgit clone git://github.com/sebastianbergmann/phpunit.gitgit clone git://github.com/sebastianbergmann/dbunit.gitgit clone git://github.com/sebastianbergmann/php-file-iterator.gitgit clone git://github.com/sebastianbergmann/php-text-template.gitgit clone git://github.com/sebastianbergmann/php-code-coverage.gitgit clone git://github.com/sebastianbergmann/php-token-stream.gitgit clone git://github.com/sebastianbergmann/php-timer.gitgit clone git://github.com/sebastianbergmann/phpunit-mock-objects.gitgit clone git://github.com/sebastianbergmann/phpunit-selenium.gitgit clone git://github.com/sebastianbergmann/phpunit-story.gitgit clone git://github.com/sebastianbergmann/php-invoker.gitsudo cp -r dbunit/PHPUnit /usr/share/php/sudo cp -r php-code-coverage/PHP /usr/share/php/sudo cp -r php-file-iterator/File /usr/share/php/sudo cp -r php-invoker/PHP /usr/share/php/sudo cp -r php-text-template/Text /usr/share/php/sudo cp -r php-timer/PHP /usr/share/php/sudo cp -r php-token-stream/PHP /usr/share/php/sudo cp -r phpunit/PHPUnit /usr/share/php/sudo cp -r phpunit-mock-objects/PHPUnit /usr/share/php/sudo cp -r phpunit-selenium/PHPUnit /usr/share/php/sudo cp -r phpunit-story/PHPUnit /usr/share/php/sudo cp -r phpunit/phpunit.php /usr/share/php/





    php入门到就业线上直播课:查看学习

    声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。

    前端(VUE)零基础到就业课程:点击学习

    清晰的学习路线+老师随时辅导答疑

    自己动手写 PHP MVC 框架:点击学习

    快速了解MVC架构、了解框架底层运行原理

    上一篇:php中字符串中某一个字符的轮换 下一篇:自己动手写 PHP MVC 框架(40节精讲/巨细/新人进阶必看)

    相关文章推荐

    • ❤️‍🔥共22门课程,总价3725元,会员免费学• ❤️‍🔥接口自动化测试不想写代码?• 一起聊聊PHP session共享的四种解决方案• 分享一个php的tcp粘包/拆包例子• php将csv文件导入到mysql数据库的方法_PHP• sql语句 - php pdo 有几种预设对象,目前我就知道俩,还望大家告知一下别的。• 运行phpmyadmin,说无法载入 mysql 扩展,请检查 PHP 配置,小弟我的环境是iis+php5.2.4+mysql5.0,已经按照网上查找的方法改了,但还是不行
    1/1

    PHP中文网