PHPUnitインストールメモ(Mac Moutain Lion)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
$ cd /usr/lib/php/
$ sudo php install-pear-nozlib.phar
[PEAR] Archive_Tar - installed: 1.3.7
[PEAR] Console_Getopt - installed: 1.3.0
[PEAR] Structures_Graph- installed: 1.0.4
[PEAR] XML_Util - installed: 1.2.1
[PEAR] PEAR - installed: 1.9.4
Wrote PEAR system config file at: /private/etc/pear.conf
You may want to add: /usr/lib/php/pear to your php.ini include_path

$ cd /etc
$ sudo cp php.ini.default php.ini
$ sudo chmod 777 php.ini
$ vi php.ini

include_path に 「/usr/lib/php/pear」を追加

1
2
3
4
5
6
$ sudo pear channel-discover pear.phpunit.de
$ sudo pear channel-discover pear.symfony-project.com
$ sudo pear channel-discover components.ez.no
$ sudo pear install pear.symfony-project.com/YAML
$ sudo pear install components.ez.no/ConsoleTools
$ sudo pear install phpunit/PHPUnit

NetBeansのユニットテストに 「/usr/bin/phpunit」 を設定