Project

General

Profile

Actions

Task #43145

closed

Integrate possibility to call inaccessible methods in BaseTestCase

Added by Oliver Hader over 11 years ago. Updated over 6 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, ...);

Actions

Also available in: Atom PDF