mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-22 08:56:56 +01:00
[BUGFIX] Allow ActionController::redirect
in tests again (#865)
In TYPO3 12LTS, this method still exists. So we are still able to mock it.
This commit is contained in:
parent
0c53667a15
commit
8fe9307b37
1 changed files with 3 additions and 6 deletions
|
@ -41,14 +41,11 @@ final class TeaControllerTest extends UnitTestCase
|
|||
parent::setUp();
|
||||
|
||||
// We need to create an accessible mock in order to be able to set the protected `view`.
|
||||
$methodsToMock = ['redirectToUri', 'htmlResponse'];
|
||||
$methodsToMock = ['htmlResponse', 'redirect', 'redirectToUri'];
|
||||
if ((new Typo3Version())->getMajorVersion() <= 11) {
|
||||
$methodsToMock = array_merge($methodsToMock, ['forward', 'redirect']);
|
||||
$methodsToMock[] = 'forward';
|
||||
}
|
||||
$this->subject = $this->getAccessibleMock(
|
||||
TeaController::class,
|
||||
$methodsToMock
|
||||
);
|
||||
$this->subject = $this->getAccessibleMock(TeaController::class, $methodsToMock);
|
||||
|
||||
$this->viewMock = $this->createMock(TemplateView::class);
|
||||
$this->subject->_set('view', $this->viewMock);
|
||||
|
|
Loading…
Reference in a new issue