2012-01-15 14:07:50 0 评论 Mac os X Boy.Lee

为Mac环境设置单元测试

{Pear升级}

sudo pear clear-cache
sudo pear channel-update pear.php.net
sudo pear upgrade-all

{PHPUnit安装}

sudo pear channel-discover pear.phpunit.de
pear channel-discover components.ez.no
pear channel-discover pear.symfony-project.com
sudo pear install –alldeps phpunit/PHPUnit

{PHPUnit_Selenium 安装}

pear install phpunit/phpunit_selenium
pear upgrade -f phpunit/phpunit_selenium

{Selenium RC 安装}

1.Download

2.{Code}

cd path/to/Selenium
java -jar selenium-server-standalone-2.16.1.jar
or
java -jar /usr/local/selenium-server/selenium-server-standalone-2.16.1.jar

{run phpunit in Yii}

cd Path/to/protected.tests
phpunit units/xxxx.php

{Done}