Skip to content

Commit

Permalink
[CLEANUP] Simplify the mock building in the unit tests (#963)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverklee authored Nov 1, 2023
1 parent a444e22 commit 350fe8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tests/Unit/Controller/TeaControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 350fe8a

Please sign in to comment.