Issue Task Closed

#43145Integrate possibility to call inaccessible methods in BaseTestCase

Oliver Hader 11/20/12, 12:11 updated 10/23/17, 22:14

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, …);

Reviews 1