Naxon's avatar
Level 6

Running a single test with PHPStorm opens it in the browser

Hi,

I'm having a problem here with PHPUnit testing on PHPStorm. When clicking 'Run' the tests directory, it does what I expect and runs it as a test. But when I click 'Run' on a single test file, it opens it in the browser instead of running it as a test.

How can I configure PHPStorm to run those files as tests so I can run a single test and not the whole suite every time?

Thank's, Daniel.

0 likes
1 reply
craigh411's avatar

You just need to let PHPStorm know where your tests are stored:

  • Settings > directories
  • Right click on "test" directory and select Tests (ctrl +t)

You should then be able to run single test files.

Please or to participate in this conversation.