要裝PHPUnit的時候說pear版本太舊,還有一堆模組需要安裝,所以先升級pear~
pear -V
PEAR Version: 1.7.2
PHP Version: 5.2.9
Zend Engine Version: 2.2.0
—–
pear upgrade PEAR
—–
pear -V
PEAR Version: 1.9.1
PHP Version: 5.2.9
Zend Engine Version: 2.2.0
—
PHPUnit 按照官網說明先增加頻道
pear channel-discover pear.phpunit.de
pear channel-discover pear.symfony-project.com
pear install phpunit/PHPUnit
然後他說:
phpunit/PHPUnit can optionally use package “pear/Image_GraphViz” (version >= 1.2.1)
phpunit/PHPUnit can optionally use package “symfony/YAML” (version >= 1.0.2)
phpunit/PHPUnit can optionally use PHP extension “pdo_mysql”
我就~
—-
pear install pear/Image_GraphViz
pear install symfony/YAML
—-
然後再升級xdebug 到2.0.5以上 我裝了2.1.0
然後就能
—-
pear install phpunit/PHPUnit
就裝好了..
使用也很簡單..按照官網範例..程式寫好以後用
PHPUnit xxx.php 去執行就會產生結果了~其他使用情況就。。還沒研究…
linux的需求呢? 支援所有LINUX嗎
能灌php就可以吧