I have never written any tests because I usually have to work with low budgets. Therefore, I usually just delete the demo files. However, I noticed that the test directory was moved from / src / MyBundle / Test in Symfony 2 to / tests in Symfony 3, and I wonder why?
Bundles are, or at least I thought they were, potentially, βdecomposableβ components in an application. This means that you can always run / work with the same package in another Symfony runtime without much effort.
So, moving the test directory from its associated package to the root directory makes no sense to me. Creating an independent piece of software, dependent / incomplete, for no reason. It actually makes me feel like I completely misunderstood the concept of bundles in Symfony.
I also noticed that Symfony tutorials started a few years ago to get their users to move their templates to / app / Resources. When I found out about this, they had patterns in related bundles that seemed cleaner to me. Why should I ever move anything outside if I already have everything connected (!) In one directory. I may have some problems with the translation, but in German the βpackageβ is 1 unit. If you split the package, you will get 2, but not half.
I usually see Symfony as a customized runtime for my packages, so I donβt touch anything external / src other than composers .json, AppKernel or configuration files.
Well, I can admit that a package may respond differently depending on its environment - but unit tests should not even rely on context if I understood them correctly.
Even if you see the AppBundle as special, context-related, it is still an inconsistent development style where some files can be found where others can be found in a completely different place. At least the AppBundle should not be a package.