PhpStorm & phpspec

Phpspec has been my favorite unit testing tool after watching this laracasts tutorial. Phpspec is a toolset that helps writing fast and easy tests, and guides towards a better software design. PhpStorm on the other hand is a very powerful PHP editor and my IDE of choice.

Unfortunately phpspec is not supported by PhpStorm yet, although they promised to support it when they find the resources. There are some plugins out there but they are buggy, so it is not safe to use them. 

A nice tip to add autocompletion in your specs is to use @mixin annotation:

use PhpSpec\ObjectBehavior;

 * @mixin User
class UserSpec extends ObjectBehavior {


Finally, here are some useful resources about phpunit and phpstorm: