PHPUnitのインストール PHPUnitはPEARからインストールします。 PHPの環境変数が設定していない場合は「C:\xampp\php」で設定しておきます。 管理権限でプロンプト(ターミナル)を起動します。 まずはPEARのアップデート。 pear upgrade PEAR 続いてPHPUnitのインストール。 pear config-set auto_discover 1 pear install pear.phpunit.de/PHPUnit 使ってみる インストールが終わったので、早速プログラムのテストをしてみましょう。 テストするためのPHPファイルを「Hello.php」という名前で作成します。 Hello.php <?php class Hello { public function getMessage() { return "hello world"; } } プ
![PHPUnitでテストしよう。IntelliJ(PHPStorm)でも実行できるようにしてみた](https://cdn-ak-scissors.b.st-hatena.com/image/square/4a3a2973dd7939605d3daca5f8858bbc32b103b0/height=288;version=1;width=512/https%3A%2F%2Fwww.webopixel.net%2Fimg%2Fog.png)