diff --git a/Tests/Unit/Controller/TeaControllerTest.php b/Tests/Unit/Controller/TeaControllerTest.php index 2613f6e5..0ee8c9bb 100644 --- a/Tests/Unit/Controller/TeaControllerTest.php +++ b/Tests/Unit/Controller/TeaControllerTest.php @@ -40,7 +40,7 @@ protected function setUp(): void { 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) {