在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/
http://www.bkjia.com/phpjc/477846.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/477846.htmltecharticle在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 plain...