![phpunit phpstorm phpunit phpstorm](https://i0.wp.com/make.xwp.co/wp-content/uploads/2016/04/PhpStorm-PHPUnit-Settings.jpg)
To show this sample configuration and to test if everything really works, I created a new project with the symfony demo application and the wasted project that provides a very nice way to setup a vagrant box for symfony2 (and other) projects. With a SFTP-Deployment configuration this will happen instantly and without drawbacks. This I can not recommend as it will create a pop-up for every testrun you execute and will take about 5 seconds until the tests first launch. Once you have the base configuration it should be easy to figure that out on your own :)Īnother reason why I write this article is that I have seen the usage of the Vagrant configuration option for the remote interpreter. With the latest version of PHPStorm (at this time 9) you can even let other functionality like PHPMD or PHPCS run on your VM, but I wont go into details with them.
Phpunit phpstorm how to#
So the main goal of this article is to show you how to configure PHPStorm that it is able to run your test-suite on the virtual machine with all the functionalities that you have when running them locally. This configuration is not only valid for a VM managed with vagrant, but with any other as well. Thats why I want to show you a sample configuration via the SFTP-Deployment + Remote Interpreter capabilities of PHPStorm, where you won’t even recognize anymore that you are not working on your host system. Though it was surprising to me, that I have hardly ever seen someone taking the time to investigate how to configure PHPStorm properly, so that it plays nice with the virtual machine in use. At Mayflower we usually use virtual machines managed with vagrant for our development environments.