LoginSignup
3

More than 5 years have passed since last update.

Vagrant上にインストールしているPHPUnitをPHPStormから実行する

Last updated at Posted at 2014-11-19

PHPStorm8.1で実施。

PHPStorm8からVagrantでインストールしているphpunitを実行出来るようになったそうで、公開されている記事を参考に設定した手順を忘れないようにメモ。

だいぶ簡略化しているので、初めて設定する場合には向かないかもしれません。

・Interpreterの設定

1.設定画面でPHP > Interpreterの横、[...]を押下

2.Interpreterダイアログが表示されるので左上の[+]を押下、Remoteを選択

3.Configure Remote PHP Interpreterダイアログが表示されるのでVagrantを選択する

4.Vagrant Instance Folderを設定し[OK]を押下してダイアログを閉じる

5.Interpreterが設定されていることを確認

・PHPUnitの設定

1.設定画面でPHP > PHPUnitの左上、[+]を押下、By Remote interpreterを選択する

2.Interpreterに登録したRemote PHP 5.5を設定する

3.Use custom autoloaderを選択する

4.Path to scriptにComposerのオートローダーのパスを指定

5.Default Configuration fileにphpunit.xmlのパスを設定

・Edit Configurationsの設定

1.メニュー > Run > Edit Configurationを選択する

2.左上の[+]を押下し[PHPUnit]を選択する

3.Nameに任意の名前を付ける

4.Test scopeでDefined in the configuraion fileを選択する

5.Runを実行してテストが開始されればOK

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
3