手动安装phpunit_PHP教程

企鹅博客
企鹅博客
企鹅博客
25193
文章
0
评论
2020年8月31日07:21:18 评论 34 views

在ubuntu12.04下面phpunit报错 PHP Fatal error: Call to undefined method PHP_CodeCoverage_Filter::getInstance() in /usr/share/php/PHPUnit/Framework.php on line 46[php] view plaincopyprint? [plain] $ pear config-show Which showed this (unlike my config-show): Configuration (channel pear.php.net): ===================================== Auto-discover new Channels auto_discover Default Channel default_channel pear.php.net HTTP Proxy Server Address http_proxy PEAR server [DEPRECATED] master_server pear.php.net Default Channel Mirror preferred_mirror pear.php.net Remote Configuration File remote_config PEAR executables directory bin_dir /usr/bin PEAR documentation directory doc_dir /usr/share/php/doc PHP extension directory ext_dir /usr/lib/php5/20090626+lfs PEAR directory php_dir /usr/share/php PEAR Installer cache directory cache_dir /tmp/pear/cache PEAR configuration file cfg_dir /usr/share/php/cfg directory PEAR data directory data_dir /usr/share/php/data PEAR Installer download download_dir /build/buildd/php5-5.3.10/pear-build-download directory PHP CLI/CGI binary php_bin /usr/bin/php php.ini location php_ini --program-prefix passed to php_prefix PHP’s ./configure --program-suffix passed to php_suffix PHP’s ./configure PEAR Installer temp directory temp_dir /tmp/pear/temp PEAR test directory test_dir /usr/share/php/test PEAR www files directory www_dir /usr/share/php/htdocs Cache TimeToLive cache_ttl 3600 Preferred Package State preferred_state stable Unix file mask umask 2 Debug Log Level verbose 1 PEAR password (for password maintainers) Signature Handling Program sig_bin /usr/bin/gpg Signature Key Directory sig_keydir /etc/pear/pearkeys Signature Key Id sig_keyid Package Signature Type sig_type gpg PEAR username (for username maintainers) User Configuration File Filename /home/username/.pearrc System Configuration File Filename /etc/pear/pear.conf You need to set following configurations: sudo pear config-set bin_dir /usr/bin sudo pear config-set doc_dir /usr/share/php/doc sudo pear config-set php_dir /usr/share/php sudo pear config-set cfg_dir /usr/share/php/cfg (make (sudo mkdir cfg) directory here) sudo pear config-set data_dir /usr/share/php/data sudo pear config-set test_dir /usr/share/php/test $ pear config-show Which showed this (unlike my config-show): Configuration (channel pear.php.net): ===================================== Auto-discover new Channels auto_discover Default Channel default_channel pear.php.net HTTP Proxy Server Address http_proxy PEAR server [DEPRECATED] master_server pear.php.net Default Channel Mirror preferred_mirror pear.php.net Remote Configuration File remote_config PEAR executables directory bin_dir /usr/bin PEAR documentation directory doc_dir /usr/share/php/doc PHP extension directory ext_dir /usr/lib/php5/20090626+lfs PEAR directory php_dir /usr/share/php PEAR Installer cache directory cache_dir /tmp/pear/cache PEAR configuration file cfg_dir /usr/share/php/cfg directory PEAR data directory data_dir /usr/share/php/data PEAR Installer download download_dir /build/buildd/php5-5.3.10/pear-build-download directory PHP CLI/CGI binary php_bin /usr/bin/php php.ini location php_ini --program-prefix passed to php_prefix PHP’s ./configure --program-suffix passed to php_suffix PHP’s ./configure PEAR Installer temp directory temp_dir /tmp/pear/temp PEAR test directory test_dir /usr/share/php/test PEAR www files directory www_dir /usr/share/php/htdocs Cache TimeToLive cache_ttl 3600 Preferred Package State preferred_state stable Unix file mask umask 2 Debug Log Level verbose 1 PEAR password (for password maintainers) Signature Handling Program sig_bin /usr/bin/gpg Signature Key Directory sig_keydir /etc/pear/pearkeys Signature Key Id sig_keyid Package Signature Type sig_type gpg PEAR username (for username maintainers) User Configuration File Filename /home/username/.pearrc System Configuration File Filename /etc/pear/pear.conf You need to set following configurations: sudo pear config-set bin_dir /usr/bin sudo pear config-set doc_dir /usr/share/php/doc sudo pear config-set php_dir /usr/share/php sudo pear config-set cfg_dir /usr/share/php/cfg (make (sudo mkdir cfg) directory here) sudo pear config-set data_dir /usr/share/php/data sudo pear config-set test_dir /usr/share/php/test [php] sudo apt-get install git mkdir phpunit && cd phpunit git clone git://github.com/sebastianbergmann/phpunit.git git clone git://github.com/sebastianbergmann/dbunit.git git clone git://github.com/sebastianbergmann/php-file-iterator.git git clone git://github.com/sebastianbergmann/php-text-template.git git clone git://github.com/sebastianbergmann/php-code-coverage.git git clone git://github.com/sebastianbergmann/php-token-stream.git git clone git://github.com/sebastianbergmann/php-timer.git git clone git://github.com/sebastianbergmann/phpunit-mock-objects.git git clone git://github.com/sebastianbergmann/phpunit-selenium.git git clone git://github.com/sebastianbergmann/phpunit-story.git git clone git://github.com/sebastianbergmann/php-invoker.git sudo 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/ sudo apt-get install git mkdir phpunit && cd phpunit git clone git://github.com/sebastianbergmann/phpunit.git git clone git://github.com/sebastianbergmann/dbunit.git git clone git://github.com/sebastianbergmann/php-file-iterator.git git clone git://github.com/sebastianbergmann/php-text-template.git git clone git://github.com/sebastianbergmann/php-code-coverage.git git clone git://github.com/sebastianbergmann/php-token-stream.git git clone git://github.com/sebastianbergmann/php-timer.git git clone git://github.com/sebastianbergmann/phpunit-mock-objects.git git clone git://github.com/sebastianbergmann/phpunit-selenium.git git clone git://github.com/sebastianbergmann/phpunit-story.git git clone git://github.com/sebastianbergmann/php-invoker.git sudo 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/

继续阅读
企鹅博客
  • 本文由 发表于 2020年8月31日07:21:18
  • 转载请务必保留本文链接:https://www.qieseo.com/305557.html
实现PHP中session和cookie数据传值功能 php教程

实现PHP中session和cookie数据传值功能

1.session 登录上一个页面以后,长时间没有操作,刷新页面以后需要重新登录。 特点:(1)session是存储在服务器;    (2)session每个人(登陆者)存一份;    (3)sess...
php 输出文字到图片上(文字水印)的代码 php教程

php 输出文字到图片上(文字水印)的代码

分享一段php代码,可实现将文字写到图片上的功能,有需要的朋友参考下吧。 有时,我们需要将一些文字打在图片上,即所谓的文字水印。 本节分享的这段代码,借助php的图像函数,可以实现这样的功能。 如果文...
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: