mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-25 18:16:13 +01:00
[CLEANUP] Simplify the mock building in the unit tests (#963)
This commit is contained in:
parent
a444e2266c
commit
350fe8abb2
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ final class TeaControllerTest extends UnitTestCase
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->teaRepositoryMock = $this->getMockBuilder(TeaRepository::class)->disableOriginalConstructor()->getMock();
|
$this->teaRepositoryMock = $this->createMock(TeaRepository::class);
|
||||||
// We need to create an accessible mock in order to be able to set the protected `view`.
|
// We need to create an accessible mock in order to be able to set the protected `view`.
|
||||||
$methodsToMock = ['htmlResponse', 'redirect', 'redirectToUri'];
|
$methodsToMock = ['htmlResponse', 'redirect', 'redirectToUri'];
|
||||||
if ((new Typo3Version())->getMajorVersion() < 12) {
|
if ((new Typo3Version())->getMajorVersion() < 12) {
|
||||||
|
|
Loading…
Reference in a new issue