[TYPO3-core] RFC #16267 Feature: Add functions to provide mocks for makeInstance
Oliver Klee
typo3-german-02 at oliverklee.de
Fri Nov 26 23:09:09 CET 2010
Hi,
Am 26.11.2010 20:56, schrieb Christian Kuhn:
> Do you have a unit test use case at hand? I'd bet you have something in
> mind ;)
Yes, for example something like this:
function FooController::initializeAction() {
$this->setFoo(t3lib_div::makeInstance('Bar'));
}
Now I'd like to test that initializeAction calls setFoo with a new Bar
created cleanly via makeInstance.
Oli
--
Certified TYPO3 Integrator | TYPO3 Security Team Member
More information about the TYPO3-team-core
mailing list