[SOLVED] PHPStorm does not recognize class in /tests directory


I am currently evaluating PHPStorm and found some problem with it. In my application, I've created a /tests directory for storing the test sources.

Inside that directory I have this base test class called AppTestCase.php, it recognized by PHPStorm just fine:

But when I create another class that extends this class called AcceptanceTestCase.php, it is not recognized by PHPStorm:

How can I solve this problem?

PhpStorm 2020.1.3
Build #PS-201.8538.41, built on July 8, 2020
Licensed to PhpStorm Evaluator
Expiration date: August 12, 2020
Runtime version: 11.0.7+10-b765.64 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1965M
Cores: 8
Registry: run.processes.with.pty=TRUE

Comment actions Permalink

Hi there,

First of all: thanks for the screenshots straight away: they help a lot (as not that many ppl are bothering posting them, even if you ask them for that).


Looks like you have made a mistake when creating that file (the way you have created it) or some unintentional manual action after that.

That file is simply treated as a Plain Text, so no indexing/analysis at all and basic syntax colors are provided by the TextMate bundle (which is confusing as it visually looks like it sort of work .. but in fact it does not).

In either case:

  • Settings/Preferences | Editor | File Types
  • Locate "Text" file type on the top list
  • Look through and remove unwanted pattern entry in the bottom list (should be AcceptanceTestCase.php or similar to that)
Comment actions Permalink

Ah yes, there seems to be the case, I've removed the pattern and it works well now. Thanks!


Please sign in to leave a comment.