Skip to content

Commit be11cf4

Browse files
authored
#11298 Added missing user mock for EditorialReminderTest (#11299)
1 parent 775efce commit be11cf4

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/jobs/email/EditorialReminderTest.php

+10-1
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,20 @@ public function testRunSerializedJob(): void
9595

9696
app()->instance('context', $contextServiceMock);
9797

98+
$userMock = Mockery::mock(\PKP\user\User::class)
99+
->makePartial()
100+
->shouldReceive([
101+
'getId' => 0,
102+
'getFullName' => 'Test User',
103+
])
104+
->withAnyArgs()
105+
->getMock();
106+
98107
$userRepoMock = Mockery::mock(app(UserRepository::class))
99108
->makePartial()
100109
->shouldReceive('get')
101110
->withAnyArgs()
102-
->andReturn(new \PKP\user\User)
111+
->andReturn($userMock)
103112
->getMock();
104113

105114
app()->instance(UserRepository::class, $userRepoMock);

0 commit comments

Comments
 (0)