PhpStorm has some weird behavior that drives me crazy. I have setup my project with source and test . The source directory must be for productive code, and the test directory must contain all phpunit tests.
In these directories, the folder structure is mirrored - if I have the class \foo\Bar , that is, src/foo/Bar.php and test/foo/BarTest.php .
I marked src/ and test/ as the source and test directory in PhpStorm, however every time I want to create a new test package for a class, by default PhpStorm places the test class in src/ directory next to the tested class.
You can change this, however it becomes more annoying when the same directory in test/ does not exist yet. Instead of creating it, PhpStorm will simply refuse to create this test suite for me.
Perhaps I misunderstand the concept of test management in PhpStorm - because it just can't be a bad user experience.
Is there something that I am doing wrong, or something that I can adjust to make the situation less painful?
source share