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

TypeTestCase #956

Merged
merged 1 commit into from
Jan 12, 2015
Merged

TypeTestCase #956

merged 1 commit into from
Jan 12, 2015

Conversation

molchanoviv
Copy link
Contributor

Hey. I prepared a TypeTestCase class with support of a MopaBootstrapBundle form extensions. It will allow users to write a unit tests for a forms which uses MopaBootstrap form types.

protected function getTypeExtensions()
{
return [
new MopaExtensions\WidgetCollectionFormTypeExtension([
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pass a default configuration to Extensions, but maybe we should inject a container and get an information from it? This will make tests a bit slower, but support of configuration. @phiamo what do you think?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think having the conf available would make it easier, and tests can be written ob a per project basis too.
can you add an example test using this, to sandboixbundle and a new doc describing the purpuse please!
this is awesome!

@molchanoviv
Copy link
Contributor Author

@phiamo Done. I added a configuration support and a documentation.

@isometriks
Copy link
Collaborator

This is cool, thank you. I was always thinking about adding something that rendered the actual forms in Twig and either using the DomCrawler to check for certain structure / classes or to actual write out the html and ignore whitespace to see if they were the same

@molchanoviv
Copy link
Contributor Author

ping @phiamo

@molchanoviv molchanoviv force-pushed the type_test_case branch 4 times, most recently from 34c5c19 to 4ec1e08 Compare October 20, 2014 08:11
phiamo added a commit that referenced this pull request Jan 12, 2015
@phiamo phiamo merged commit fef60fc into phiamo:master Jan 12, 2015
@phiamo
Copy link
Owner

phiamo commented Jan 12, 2015

thanks a lot!

@phiamo phiamo mentioned this pull request Jan 12, 2015
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

Successfully merging this pull request may close these issues.

3 participants