Feature #35135

Provide an inject() convenience method in Base Test Case

Added by Robert Lemke over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
- Testing -
Start date:
2012-03-22
Due date:
% Done:

100%

Estimated time:
PHP Version:
5.3
Has patch:
No
Complexity:
easy

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.

Also available in: Atom PDF