[TYPO3-mvc] RFC #11225: Tx_Extbase_DomainObject_AbstractDomainObject::getUid cannot be mocked as it is final

Oliver Klee typo3-german-01 at oliverklee.de
Thu Dec 2 15:48:09 CET 2010


This is a SVN patch request.

Type: Bugfix

Bugtracker reference:
http://forge.typo3.org/issues/11225

Branches:
trunk

Problem:
phpunit cannot mock final, private or static methods [1].

Tx_Extbase_DomainObject_AbstractDomainObject::getUid is final and thus
cannot be mocked which makes unit testing unnecessary hard.

Solution:
Make that method non-final.


[1] http://www.phpunit.de/manual/current/en/test-doubles.html


More information about the TYPO3-project-typo3v4mvc mailing list