PHPUnit and PHPStorm 7.0


I've got a symfony application, and phpunit runs fine from the command line using this command

phpunit -c app/ src/Authentic/RegistrarBundle/Tests/Controller/DefaultControllerTest.php

running from the root of the project, but i can't get phpstorm to run it for the life of me. current issue is that it doesn't seem to be using the autoload, as its failing on a dependancy used in my test..

I've configured it to use 'path to phar' and pointed it at my phpunit.phar

Any suggestions welcome, I don't really understand why phpstorm is using this command to launch phpunit

/usr/local/bin/php "-c app/" /private/var/folders/qm/6n_34fgs2knfw9_9c5hq1h_r0000gn/T/ide-phpunit.php --no-configuration Authentic\RegistrarBundle\Tests\Controller\DefaultControllerTest /Users/bill/projects/AuthenticDemo/src/Authentic/RegistrarBundle/Tests/Controller/DefaultControllerTest.php

Testing started at 2:42 PM ...

Fatal error: Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found in /Users/bill/projects/AuthenticDemo/src/Authentic/RegistrarBundle/Tests/Controller/DefaultControllerTest.php on line 8

Process finished with exit code 255...

WebTestCase is my base class for tests.

I'd like to be able to run these things from within phpunit..

Comment actions Permalink

Please set here:
File | Settings | PHP | PHPUnit | Test Runner | Default configuration file : app/phpunit.xml.dist
Default bootstrap file: app/bootstrap.php.cahce .
(For Mac OS: Preferences | PHP | ...)

Comment actions Permalink

Ok, much better!

Now it's not including autoload, should i pass that in as a command line?


Please sign in to leave a comment.