- Issue created by @pdureau
- Assigned to oldeb
- 🇧🇪Belgium oldeb Brussels
If possible, fix an issue in LinksPropTypeNormalizationTest where 2 tests where disabled (commented) because they need the service container:
If you need the service container then you need a KernelTest instead of a UnitTest.
Should I change the whole test class into a KernelTest or should I split the it into 2 tests (1 unit test and one kernel test) ?
- Status changed to Needs work
27 days ago 2:15pm 23 August 2024 - 🇫🇷France pdureau Paris
Should I change the whole test class into a KernelTest or should I split the it into 2 tests (1 unit test and one kernel test) ?
Single KernelTest. Maybe all 3 tests can become kernel tests (to keep them in the same folder)
- 🇧🇪Belgium oldeb Brussels
The issue in fact is that the container is called from a static method which is not aware of the container.
What I think we should do :
- move the fixutres data (current static functions) to yaml files
- avoid calling the Url class in the fixtures data (if possible)
- call the Url class dynamically in the test method (if required)
- mock the pathValidator service
- 🇫🇷France pdureau Paris