今までWebAPIのテストはFrisby + jasmine-nodeで書いていましたが、PHPでも書いてみます。 なお、WebAPIにリクエストするライブラリとしてGuzzleを利用してみたいと思います。Guzzleは直感的でかつ、非同期や様々なオプションに対応していてすばらしいです。 WebUIのテストについてはこちら。 前提 composerがインストールされている Mac(El capitan) ホームディレクトリ内にtestというフォルダを作ってその中で作業するものとします。 準備 ライブラリのダウンロード #ディレクトリ作成 cd ~/ mkdir test cd test #phpunitとguzzleのインストール composer require phpunit/phpunit composer require guzzlehttp/guzzle guzzeleはVer5