Closed m-vo closed 3 years ago
The point of the test-case package is that people are supposed to be able to use it in their custom installations/extensions, too. Because when you write tests for a Contao installation/extension, you are likely to need a container with the Contao configuration.
I know but that still does not solve the problem... I had the thought if we should rather allow specific reusable things in the core-bundle
(that you would require anyway in this case), i.e. explicitly include them in the BC promise.
Does Symfony have any reusable test components?
As discussed in Mumble on February 11th, we want to keep the test case as separate package, so we can release new major versions with BC breaks without having to wait for Contao 5.
IMHO methods like
TestCase#getContainerWithContaoConfiguration()
are closely tied to the codebase and should live in the mono repo as well. To me most things in this repo should either be more abstract or not be reusable at all (because Tests should not be designed to be reusable, nor covered from a BC promise).Example
In newer versions of
contao/contao
we have to add definitions likerequest_stack
andcontao.security.token_checker
to the test container, so that using the legacy framework works.We could oc add this to the test case in a certain version but IMHO we should consider integrating the bundle into the core again.