Feature #35135
Provide an inject() convenience method in Base Test Case
Status: | Resolved | Start date: | 2012-03-22 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Robert Lemke | % Done: | 100% |
|
Category: | - Testing - | |||
Target version: | TYPO3 Flow Base Distribution - 1.1 beta 1 | |||
PHP Version: | 5.3 | Complexity: | easy | |
Has patch: | No |
Description
Testing code which uses dependency injection requires some additional lines of code for manually injecting the dependencies needed to run a unit test. This can become cumbersome in case of property injection, as reflection needs to be used in order to set a protected property.
An inject() method provided by the Base Test Case would make things a lot easier.
Associated revisions
[FEATURE] inject() convenience method in Base Test Case
Testing code which uses dependency injection requires
some additional lines of code for manually injecting
the dependencies needed to run a unit test.
This patch provides a new convenience method – inject() –
which takes care of manual injection of dependencies
in unit test cases.
Resolves: #35135
Releases: 1.1
Change-Id: I0f445b470dcc7acd4023b0f5ab24942326812dd8
History
#1 Updated by Gerrit Code Review over 3 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9870
#2 Updated by Robert Lemke over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 8152b8c97a292e79e24b514b161850ccdba85b03.