Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

pettturu's avatar

Class Tests\TestCase not found, PHP Storm configuration problem?

Hi, I'm running tests in a nearly fresh Laravel 5.5 installation, using PHP Storm 2016.3

Somehow, I can not run a single test from PHP Storm as it can not find the TestCase class allthough all tests run fine when I run the whole suite or tests in Feature or Unit folder.

Running from cmd line with --filter <test_function_name> also works.

I've set vendor/autoload.php in PHP Storm preferences as PHPUnit library.

What am I missing???

0 likes
3 replies
larsonator's avatar

I am having that issue as well.

From what i can work out, PHPStorm, for what ever reason, doesn't recognize the tests in laravel 5.5 as tests, and tries to execute the files as PHP scripts.

1 like
larsonator's avatar
Level 3

@pettturu Hey mate, check your version of PHPStorm,

i just updated mine from 2016.3 to 2017.2.

Looks like 2016.3 is not compatible with PHPUnit 6

1 like
pettturu's avatar

Thanks @larsonator, that was the case.

Been busy so I just went down to PHPUnit 5.7.22... (faster to download than PHPStorm =)

Please or to participate in this conversation.