bencarter78@hotmail.com's avatar

PHPStorm - Running PHPUnit test from 'Run context configuration' gives Class 'Tests\TestCase' not found error

Hello

I have one of those issues where it was working last week, but for some reason today it's not working.

I had a workflow with PHPStorm whereby I could place my cursor in a test method and 'Run context configuration' and it would test that method. Today (after a reboot) it shows me the error Class 'Tests\TestCase' not found.

I've managed to set up a specific configuration for a test method but of course, don't want to set one up for everyone! I had it before where it just seemed to work but it's been so long since I set it up that I've forgotten what I did to get it working where this would always just work.

Can anyone help?

0 likes
1 reply
bencarter78@hotmail.com's avatar

My bad, there was something weird with that particular test file. All other tests were working but for some reason that wasn't. Deleted the file, started again and it seems to be working.

I hate not knowing!!

Please or to participate in this conversation.