Task #43145

Integrate possibility to call inaccessible methods in BaseTestCase

Added by Oliver Hader over 8 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Tests
Target version:
Start date:
2012-11-20
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
5.3
Tags:
Complexity:
Sprint Focus:

Description

The BaseTestCase already has a possibility to create full blown accessible object proxies.
However if one does not want to have the class stack cluttered with temporary existing classes, there shall be a possibility to directly invoke protected/private methods of a fixture object.

The new method callInaccessibleMethod method is taken and rewritten from ModuleControllerTest.

Example to use it in unit tests:
$this->fixture = new \TYPO3\CMS\Core\SomeClassName();
$result = $this->callInaccessibleMethod($this->fixture, 'privateMethod', $first, $second, $third, ...);

#1

Updated by Gerrit Code Review over 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16598

#2

Updated by Gerrit Code Review over 8 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16598

#3

Updated by Oliver Hader over 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#4

Updated by Riccardo De Contardi over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF