Skip to content

Add docs to register custom form extensions and types for unit testing #7578

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

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions form/unit_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@ allows you to return a list of extensions to register::
// ... your tests
}

It is also possible to load custom form types, form type extensions or type guessers using the
``getTypedExtensions``, ``getTypes`` and ``getTypeGuessers`` methods.
Copy link
Member

Choose a reason for hiding this comment

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

This should be part of a separate pull request as we will have to merge it into the master branch (the rest can be merged into the docs for Symfony 2.7).

Copy link
Member

Choose a reason for hiding this comment

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

One thing I forgot: Can you also add a versionadded directive that mentions the introduction of the new methods?


.. versionadded:: 3.3
The ``getTypedExtensions``, ``getTypes`` and ``getTypeGuessers`` were introduced in Symfony 3.3.

Testing against Different Sets of Data
--------------------------------------

Expand Down