ホームページ php教程 php手册 手动安装phpunit

手动安装phpunit

Jun 13, 2016 am 10:53 AM
ca error fatal php 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[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/

 

 

 

 

 

 

このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。

ホットAIツール

Undresser.AI Undress

Undresser.AI Undress

リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover

AI Clothes Remover

写真から衣服を削除するオンライン AI ツール。

Undress AI Tool

Undress AI Tool

脱衣画像を無料で

Clothoff.io

Clothoff.io

AI衣類リムーバー

AI Hentai Generator

AI Hentai Generator

AIヘンタイを無料で生成します。

ホットツール

メモ帳++7.3.1

メモ帳++7.3.1

使いやすく無料のコードエディター

SublimeText3 中国語版

SublimeText3 中国語版

中国語版、とても使いやすい

ゼンドスタジオ 13.0.1

ゼンドスタジオ 13.0.1

強力な PHP 統合開発環境

ドリームウィーバー CS6

ドリームウィーバー CS6

ビジュアル Web 開発ツール

SublimeText3 Mac版

SublimeText3 Mac版

神レベルのコード編集ソフト(SublimeText3)

Ubuntu および Debian 用の PHP 8.4 インストールおよびアップグレード ガイド Ubuntu および Debian 用の PHP 8.4 インストールおよびアップグレード ガイド Dec 24, 2024 pm 04:42 PM

PHP 8.4 では、いくつかの新機能、セキュリティの改善、パフォーマンスの改善が行われ、かなりの量の機能の非推奨と削除が行われています。 このガイドでは、Ubuntu、Debian、またはその派生版に PHP 8.4 をインストールする方法、または PHP 8.4 にアップグレードする方法について説明します。

CakePHP データベースの操作 CakePHP データベースの操作 Sep 10, 2024 pm 05:25 PM

CakePHP でデータベースを操作するのは非常に簡単です。この章では、CRUD (作成、読み取り、更新、削除) 操作について理解します。

CakePHP の日付と時刻 CakePHP の日付と時刻 Sep 10, 2024 pm 05:27 PM

Cakephp4 で日付と時刻を操作するには、利用可能な FrozenTime クラスを利用します。

CakePHP ファイルのアップロード CakePHP ファイルのアップロード Sep 10, 2024 pm 05:27 PM

ファイルのアップロードを行うには、フォーム ヘルパーを使用します。ここではファイルアップロードの例を示します。

CakePHP ルーティング CakePHP ルーティング Sep 10, 2024 pm 05:25 PM

この章では、ルーティングに関連する次のトピックを学習します。

CakePHP について話し合う CakePHP について話し合う Sep 10, 2024 pm 05:28 PM

CakePHP は、PHP 用のオープンソース フレームワークです。これは、アプリケーションの開発、展開、保守をより簡単にすることを目的としています。 CakePHP は、強力かつ理解しやすい MVC のようなアーキテクチャに基づいています。モデル、ビュー、コントローラー

CakePHP バリデータの作成 CakePHP バリデータの作成 Sep 10, 2024 pm 05:26 PM

Validator は、コントローラーに次の 2 行を追加することで作成できます。

CakePHP のロギング CakePHP のロギング Sep 10, 2024 pm 05:26 PM

CakePHP へのログインは非常に簡単な作業です。使用する関数は 1 つだけです。 cronjob などのバックグラウンド プロセスのエラー、例外、ユーザー アクティビティ、ユーザーが実行したアクションをログに記録できます。 CakePHP でのデータのログ記録は簡単です。 log()関数が提供されています

See all articles