routing-bundle icon indicating copy to clipboard operation
routing-bundle copied to clipboard

configuration test for different configurations

Open ElectricMaxxx opened this issue 11 years ago • 6 comments

I just fixed just a bug with #223 but i think we should go over the configuration and build different config test cases and test them. Btw we should be able to refactor the one or other Exception in an ->thenInvalid() thing.

ElectricMaxxx avatar Apr 01 '14 21:04 ElectricMaxxx

There are already quite some config tests: https://github.com/symfony-cmf/RoutingBundle/tree/master/Tests/Resources/Fixtures/config

wouterj avatar Jun 27 '14 08:06 wouterj

if somebody wants to do this, i think the right thing is looking at the code coverage in the Configuration and RoutingBundleExtension classes and you probably mainly notice uncovered sanity checks for invalid configuration. adding tests for those makes sense to avoid regressions.

dbu avatar Jun 27 '14 09:06 dbu

@dbu looking at the coverage, I think we have covered it quite well: http://jsbin.com/sozimako/1/quiet

wouterj avatar Jun 27 '14 12:06 wouterj

indeed. @ElectricMaxxx what did you find missing?

dbu avatar Jun 27 '14 14:06 dbu

Hmm, most edge cases of the extension aren't covered: http://jsbin.com/sozimako/2/quiet

wouterj avatar Jun 27 '14 14:06 wouterj

ah yeah. all orm things for example.

most of this validation should ideally be moved into the Configuration class btw.

dbu avatar Jun 27 '14 14:06 dbu