prestaconcept / PrestaSitemapBundle

A symfony bundle that provides tools to build a rich application sitemap. The main goals are : simple, no databases, various namespace (eg. google image), respect constraints etc.
MIT License
357 stars 102 forks source link

Test suite refactoring #224

Closed yann-eugone closed 4 years ago

yann-eugone commented 4 years ago

While working on #221 #223 & #223, we noticed that tests lack for updates and did not cover some use cases.

I promised that I would work on some refactoring for the whole test suite, this is the reason why I created this PR.

The tests are now run in two separated test suites : Unit & Integration.

Unit test suite

Is mostly the same than previously, but I removed every WebTestCase / KernelTestCase dependency from that suite. Also, as this is a unit test suite, it's ok (a good practice ?) to rely on mock and stubs for this bundle interfaces. This is why I updated some tests on that way.

Integration test suite

Is the brand new test suite that was added. The structure of that suite looks like an actual Symfony project. It contains a Symfony Kernel which will be called to boot a simple application.

There is 2 tests in that suite :

TODO

yann-eugone commented 4 years ago

@ostrolucky as promised ;)