Black Friday: the Laravel testing course is $149 instead of $249, through Dec 7. See the course →
logo

Quickly viewing test file structure

Another reason I like patterns

Joel Clermont
Joel Clermont
2024-02-26

From our daily Laravel tips email. Get the next one in your inbox.

In PHPStorm, when I'm surveying a file, especially a big test class with lots of test methods, I used to collapse all functions to make it easier to navigate.

But recently, I was pairing with Aaron, and he showed me the Structure view.

Viewing file structure in PHPStorm

This is way easier for scanning and jumping around a file, and it's only a keystroke away (Cmd-7 on macOS).

It's also not unique to PHPStorm. I'm sure a similar feature exists if you prefer a different editor.

Here to help,

Joel

P.S. Wish your Laravel app had good test coverage like this? We can help with that!

Want a tip like this in your inbox every weekday?

Each one takes less than 2 minutes to read. Join 4,000+ Laravel developers who already get them.

email
No spam. Only real-world advice.
Toss a coin in the jar if you found this helpful.