ICBaseTestBundle icon indicating copy to clipboard operation
ICBaseTestBundle copied to clipboard

UnitTestCase Helper not aligned

Open rdohms opened this issue 12 years ago • 2 comments

In line with the issue #39 the UnitTestCase is also using a different implementation of the helper algorithm, so that it does not know how to get the ServiceHelper by using "service".

Is this intended?

rdohms avatar Oct 23 '13 10:10 rdohms

Problem may be a bit lower down as the AbstractHelper insists on having an instance of WebTestCase in the constructor, so actually its impossible to use it with anything other then Functional tests.

rdohms avatar Oct 23 '13 10:10 rdohms

@rdohms The divergence between the two base test cases (TestCase, WebTestCase) need to be addressed. This bundle is going to have some significant refactoring related to WebTestCase in the near future (probably within 2-3 weeks). Ideally we can make some changes that do not affect BC, but I would probably expect a major version bump. This will also include the new version of DoctrineDataFixtures once @guilhermeblanco can release the next version.

Regarding your specific question: No it was not intended. The WebTestCase was the original implementation when we were applying functional testing across all layers of the application. We've spent more of our efforts supporting just TestCase, so I am open to applying any changes you have in mind.

We can probably isolate the helpers functionality out of the base classes themselves and add the loading and instantiation as a dependency so it may be reused. I see some possible scenarios where a helper may want to be used across both TestCase and WebTestCase, so we would have to determine (probably via interface) when to inject available resources, I.e., if the TestCase implements Container/KernelAware.

Please feel free to propose/make any changes.

jcart avatar Oct 23 '13 22:10 jcart