> 백엔드 개발 > PHP 튜토리얼 > 手动装配phpunit

手动装配phpunit

WBOY
풀어 주다: 2016-06-13 11:06:56
원래의
779명이 탐색했습니다.

手动安装phpunit

在ubuntu12.04下面phpunit报错

<code style="margin:0px; padding:0px; border:0px; vertical-align:baseline; font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif"><span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent">PHP </span><span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:rgb(43,145,175)">Fatal</span><span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent"> error</span><span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent">:</span><span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent">  </span><span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:rgb(43,145,175)">Call</span><span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent"> to </span><span class="kwd" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:rgb(0,0,139)">undefined</span><span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent"> method PHP_CodeCoverage_Filter</span><span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent">::</span><span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent">getInstance</span><span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent">()</span><span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent"> </span><span class="kwd" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:rgb(0,0,139)">in</span><span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent"> </span><span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent">/</span><span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent">usr</span><span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent">/</span><span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent">share</span><span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent">/</span><span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent">php</span><span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent">/</span><span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:rgb(43,145,175)">PHPUnit</span><span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent">/</span><span class="typ" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:rgb(43,145,175)">Framework</span><span class="pun" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent">.</span><span class="pln" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent">php on line </span><span class="lit" style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent; color:rgb(128,0,0)">46</span></code>
로그인 후 복사
로그인 후 복사

$ 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.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿