Skip to content

Commit

Permalink
minor #6381 [Form] [Cookbook] Correctly setup unit tests with depende…
Browse files Browse the repository at this point in the history
…ncies (corphi)

This PR was submitted for the 3.0 branch but it was merged into the 2.8 branch instead (closes #6381).

Discussion
----------

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

Among other things, `parent::setUp()` will call `getExtensions()` that uses the private variables.

Commits
-------

fba2da2 Calling the parent implementation is mandatory.
  • Loading branch information
xabbuh committed Mar 26, 2016
2 parents b20e1ca + fba2da2 commit c9b54db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cookbook/form/unit_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,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 comments on commit c9b54db

Please sign in to comment.