Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnitTestCase Helper not aligned #41

Open
rdohms opened this issue Oct 23, 2013 · 2 comments
Open

UnitTestCase Helper not aligned #41

rdohms opened this issue Oct 23, 2013 · 2 comments

Comments

@rdohms
Copy link
Contributor

rdohms commented Oct 23, 2013

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
Copy link
Contributor Author

rdohms commented Oct 23, 2013

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.

@jcart
Copy link
Contributor

jcart commented Oct 23, 2013

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants