I'm coming across what seems to be contradictory information, and I'm hoping someone here can clarify. The basic question is "what is the correct folder structure for PSR-4 style auto-discovery of classes in Drupal 8, particularly test classes, and how much flexibility is there in that structure?" (I apologize in advance about this, but I'm going to have to partially break up my question into comments, since I don't have enough reputation yet to post all the necessary links.)
I have run across the following conventions I'm about to list in subsequent comments. I'm hoping someone can clarify what the proper layout is. Or will all work? I could spin up a D8 instance and test this, but I'm afraid such a cursory examination would conceal pitfalls of one approach versus the other, in terms of community support.
[module_root]/src/tests
.[module_root]/src/Tests
.[module_root]/tests/src
, and referencescore/phpunit.xml.dist
which shows a degree of authority.[module_root]/tests/src