mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-10 00:56:12 +01:00

[CLEANUP] Simplify the mock building in the unit tests (#963)

This commit is contained in:
Oliver Klee 2023-11-01 20:59:07 +01:00 committed by GitHub
parent a444e2266c
commit 350fe8abb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,7 +40,7 @@ final class TeaControllerTest extends UnitTestCase
{
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`.
$methodsToMock = ['htmlResponse', 'redirect', 'redirectToUri'];
if ((new Typo3Version())->getMajorVersion() < 12) {