{"id":1062,"date":"2014-01-09T13:24:00","date_gmt":"2014-01-09T13:24:00","guid":{"rendered":"https:\/\/rawbytes.org\/?p=1062"},"modified":"2025-11-24T02:59:35","modified_gmt":"2025-11-24T02:59:35","slug":"osx%e3%81%aephp%e3%81%abpear%e3%81%a8phpunit%e3%81%ae%e5%85%a5%e3%82%8c%e6%96%b9%e3%81%ae%e8%a6%81%e7%82%b9%e3%81%a0%e3%81%91","status":"publish","type":"post","link":"https:\/\/rawbytes.org\/?p=1062","title":{"rendered":"OSX\u306ePHP\u306bPEAR\u3068PHPUnit\u306e\u5165\u308c\u65b9\u306e\u8981\u70b9\u3060\u3051"},"content":{"rendered":"<p>OSX\u306ePHP\u3067\u3001PEAR\u306fLion\u307e\u3067\uff1f\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u305f\u3089\u3057\u3044\u304c\u3001\u305d\u308c\u4ee5\u964d\u5165\u3063\u3066\u3044\u306a\u3044\u3089\u3057\u3044\u306e\u3067\u3001PEAR\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068PHPUnit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u3084\u308b\u3002<\/p>\n<p><!--more--><\/p>\n<div class=\"p1\">\n\u4ee5\u964d\u3001OSX 10.8.5\u3068PHP 5.3.26\u3067\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30e1\u30e2\u3002PHP\u306fOSX\u6a19\u6e96\u306e\u3082\u306e\u3002<\/p>\n<blockquote class=\"tr_bq\"><p>\n$ sw_vers<br \/>\nProductName:<span class=\"Apple-tab-span\"> <\/span>Mac OS X<br \/>\nProductVersion:<span class=\"Apple-tab-span\"> <\/span>10.8.5<br \/>\nBuildVersion:<span class=\"Apple-tab-span\"> <\/span>12F45<br \/>\n$ php -v<br \/>\nPHP 5.3.26 (cli) (built: Jul &nbsp;7 2013 19:05:08)<br \/>\nCopyright (c) 1997-2013 The PHP Group<br \/>\nZend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies<\/p><\/blockquote>\n<p>\n1. PEAR\u306e.phar\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/p>\n<blockquote class=\"tr_bq\"><p>\n$ curl -O http:\/\/pear.php.net\/go-pear.phar<\/p><\/blockquote>\n<p>\n2. PEAR\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<blockquote class=\"tr_bq\"><p>\n$ sudo php -d detect_unicode=0 go-pear.phar<\/p><\/blockquote>\n<p>\u9014\u4e2d\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u3092\u6307\u5b9a\u3067\u304d\u308b\u306e\u3067\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5148\u3092\u7de8\u96c6\u3057\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308b\u3002<br \/>\n\uff08\u30d1\u30b9\u3055\u3048\u901a\u3063\u3066\u308c\u3070\u3069\u3053\u3067\u3082\u3044\u3044\u3068\u601d\u3046\uff09<\/p>\n<blockquote class=\"tr_bq\"><p>\n&nbsp;1. Installation base ($prefix) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : \/usr\/lib\/php<br \/>\n&nbsp;2. Temporary directory for processing &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: \/tmp\/pear\/install<br \/>\n&nbsp;3. Temporary directory for downloads &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : \/tmp\/pear\/install<br \/>\n&nbsp;4. Binaries directory &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: \/usr\/bin<br \/>\n&nbsp;5. PHP code directory ($php_dir) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : \/usr\/lib\/php\/share\/pear<br \/>\n&nbsp;6. Documentation directory &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : \/usr\/lib\/php\/docs<br \/>\n&nbsp;7. Data directory &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: \/usr\/lib\/php\/data<br \/>\n&nbsp;8. User-modifiable configuration files directory : \/usr\/lib\/php\/cfg<br \/>\n&nbsp;9. Public Web Files directory &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: \/usr\/lib\/php\/www<br \/>\n10. Tests directory &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : \/usr\/lib\/php\/tests<br \/>\n11. Name of configuration file &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: \/Users\/dms\/.pearrc<\/p><\/blockquote>\n<p>\n3. php.ini\u306binclude_path\u3092\u7de8\u96c6\u3059\u308b\uff08\u5fc5\u8981\u3042\u308c\u3070\u4e0a\u8a18\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4e2d\u306b\u6ce8\u610f\u66f8\u304d\u304c\u51fa\u308b\uff09<\/p>\n<blockquote class=\"tr_bq\"><p>\n$ sudo cp \/etc\/php.ini.default \/etc\/php.ini<\/p><\/blockquote>\n<p>\u79c1\u306e\u5834\u5408\u306f\u66f8\u304d\u8fbc\u307f\u6a29\u9650\u304c\u7121\u304b\u3063\u305f\u304b\u3089\u8ffd\u52a0\u3057\u305f<\/p>\n<blockquote class=\"tr_bq\"><p>\n$ sudo chmod u+w \/etc\/php.ini<\/p><\/blockquote>\n<p>\u4ee5\u4e0b\u306e\u884c\uff08\u4e0a\u8a18PHP code directory\u306e\u30d1\u30b9\uff09\u3092\u8db3\u3057\u3066\u4fdd\u5b58\u3002<\/p>\n<blockquote class=\"tr_bq\"><p>\ninclude_path = &#8220;.:\/usr\/lib\/php\/share\/pear&#8221;<\/p><\/blockquote>\n<p>\n\u4ee5\u4e0a\u3067PEAR\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u7d42\u4e86\u3002\u6b21\u306bPHPUnit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<br \/>\n\u57fa\u672c\u7684\u306b\u3053\u3053\u306e\u901a\u308a\u306b\u3084\u308c\u3070\u826f\u3044\u3002http:\/\/phpunit.de\/manual\/3.7\/ja\/installation.html#installation.pear<\/p>\n<blockquote class=\"tr_bq\"><p>\n$ sudo pear config-set auto_discover 1<br \/>\n$ sudo pear install pear.phpunit.de\/PHPUnit<\/p><\/blockquote>\n<div>\n\u30a8\u30e9\u30fc\u304c\u51fa\u305a\u306b\u7d42\u4e86\u3059\u308c\u3070phpunit\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u308b\u306f\u305a\u3002<\/div>\n<blockquote class=\"tr_bq\"><p>\n$ phpunit &#8211;version<br \/>\nPHPUnit 3.7.28 by Sebastian Bergmann.<\/p><\/blockquote>\n<div>\n\u4ed6\u306e\u30d6\u30ed\u30b0\u3092\u8abf\u3079\u308b\u3068\u500b\u5225\u306bchannel\u3092\u8ffd\u52a0\u3057\u3066\u308b\u4f8b\u304c\u3042\u3063\u305f\u3051\u3069\u3001\u57fa\u672c\u7684\u306b\u306fauto_discover\u3057\u3066\u3084\u308c\u3070\u826f\u3044\u3063\u307d\u3044\u3002<\/div>\n<p>\u3082\u3057\u3082\u3046\u307e\u304f\u884c\u304b\u306a\u3044\u5834\u5408\u306f\u9069\u5b9cpear\u306echannel\u3092\u8ffd\u52a0\u3057\u3066\u3084\u308c\u3070\u826f\u3044\u3068\u601d\u3046\u3002\u4f8b\u3048\u3070\uff1a<\/p>\n<blockquote class=\"tr_bq\"><p>\n$ sudo pear channel-discover pear.phpunit.de<\/p><\/blockquote>\n<p>\n\u304a\u3057\u307e\u3044<\/div>\n","protected":false},"excerpt":{"rendered":"<p>OSX\u306ePHP\u3067\u3001PEAR\u306fLion\u307e\u3067\uff1f\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u305f\u3089\u3057\u3044\u304c\u3001\u305d\u308c\u4ee5\u964d\u5165\u3063\u3066\u3044\u306a\u3044\u3089\u3057\u3044\u306e\u3067\u3001PEAR\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068PHPUnit\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u3084\u308b\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,21,31],"tags":[],"class_list":["post-1062","post","type-post","status-publish","format-standard","hentry","category-develop","category-howto","category-php"],"_links":{"self":[{"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/posts\/1062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rawbytes.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1062"}],"version-history":[{"count":1,"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/posts\/1062\/revisions"}],"predecessor-version":[{"id":1063,"href":"https:\/\/rawbytes.org\/index.php?rest_route=\/wp\/v2\/posts\/1062\/revisions\/1063"}],"wp:attachment":[{"href":"https:\/\/rawbytes.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rawbytes.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rawbytes.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}