If I understand well, what we do here is to run the tests twice, once in development mode and another time in production mode.
I don't see the point of doing that. This will more likely result in a situation where the production tests will fail because the configuration does not fit the local environment.

What would be relevant IMHO is indeed to tests if we are able to pick the right configuration according to a specific environment.