LoginSignup
5
0

More than 5 years have passed since last update.

ファイルが変更されたら自動的にPHPUnitを実行する

Last updated at Posted at 2017-09-20

pywatchを使ってファイル変更を検出してphpunitを実行します。

pywatchのインストール

RedHat系(CentOS)

sudo yum install python pip
sudo pip install --upgrade pip
sudo pip install pywatch

Debian系

sudo apt-get install python-pip
sudo pip install --upgrade pip 
sudo pip install pywatch

実行

pywatch ./vendor/bin/phpunit test_dir

これでいちいちコマンドを実行しなくてもテストを変更したりテスト対象のコードを変更すると自動的にテストを実行してくれます。べんり。

pywatchくんはphpunitだけではなくて、どんなコマンドでも実行できるのでファイル変更検出してなにかしたいときには使えるやつです。いいこ。

5
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
0