From 350fe8abb23fcdf750f067c49b32e663c44db1ac Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Wed, 1 Nov 2023 20:59:07 +0100 Subject: [PATCH] [CLEANUP] Simplify the mock building in the unit tests (#963) --- Tests/Unit/Controller/TeaControllerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Unit/Controller/TeaControllerTest.php b/Tests/Unit/Controller/TeaControllerTest.php index 2613f6e..0ee8c9b 100644 --- a/Tests/Unit/Controller/TeaControllerTest.php +++ b/Tests/Unit/Controller/TeaControllerTest.php @@ -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) {