Skip to content

Commit 55179b3

Browse files
authored
#11298 Added missing user mock for EditorialReminderTest (#11301)
1 parent f647417 commit 55179b3

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
@@ -131,11 +131,20 @@ public function register(\Pimple\Container $pimple)
131131
}
132132
);
133133

134+
$userMock = Mockery::mock(\PKP\user\User::class)
135+
->makePartial()
136+
->shouldReceive([
137+
'getId' => 0,
138+
'getFullName' => 'Test User',
139+
])
140+
->withAnyArgs()
141+
->getMock();
142+
134143
$userRepoMock = Mockery::mock(app(UserRepository::class))
135144
->makePartial()
136145
->shouldReceive('get')
137146
->withAnyArgs()
138-
->andReturn(new \PKP\user\User)
147+
->andReturn($userMock)
139148
->getMock();
140149

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

0 commit comments

Comments
 (0)