10000 [Form] [Cookbook] Correctly setup unit tests with dependencies by corphi · Pull Request #6381 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Form] [Cookbook] Correctly setup unit tests with dependencies #6381

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 1 commit 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
Calling the parent implementation is mandatory.
Among other things, `parent::setUp()` will call `getExtensions()` that uses the private variables.
  • Loading branch information
corphi committed Mar 17, 2016
commit 5f73feb7b66fc873e4e789dea7a9e9c8c8cc34c5
2 changes: 2 additions & 0 deletions cookbook/form/unit_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ make sure the ``FormRegistry`` uses the created instance::
{
// mock any dependencies
$this->entityManager = $this->getMock('Doctrine\Common\Persistence\ObjectManager');

parent::setUp();
}

protected function getExtensions()
Expand Down
0