3535use OCA \UserStatus \Exception \InvalidStatusIconException ;
3636use OCA \UserStatus \Exception \InvalidStatusTypeException ;
3737use OCA \UserStatus \Exception \StatusMessageTooLongException ;
38- use OCA \UserStatus \Service \EmojiService ;
3938use OCA \UserStatus \Service \PredefinedStatusService ;
4039use OCA \UserStatus \Service \StatusService ;
4140use OCP \AppFramework \Db \DoesNotExistException ;
4241use OCP \AppFramework \Utility \ITimeFactory ;
4342use OCP \DB \Exception ;
4443use OCP \IConfig ;
44+ use OCP \IEmojiHelper ;
4545use OCP \UserStatus \IUserStatus ;
4646use Test \TestCase ;
4747
@@ -56,8 +56,8 @@ class StatusServiceTest extends TestCase {
5656 /** @var PredefinedStatusService|\PHPUnit\Framework\MockObject\MockObject */
5757 private $ predefinedStatusService ;
5858
59- /** @var EmojiService |\PHPUnit\Framework\MockObject\MockObject */
60- private $ emojiService ;
59+ /** @var IEmojiHelper |\PHPUnit\Framework\MockObject\MockObject */
60+ private $ emojiHelper ;
6161
6262 /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
6363 private $ config ;
@@ -71,7 +71,7 @@ protected function setUp(): void {
7171 $ this ->mapper = $ this ->createMock (UserStatusMapper::class);
7272 $ this ->timeFactory = $ this ->createMock (ITimeFactory::class);
7373 $ this ->predefinedStatusService = $ this ->createMock (PredefinedStatusService::class);
74- $ this ->emojiService = $ this ->createMock (EmojiService ::class);
74+ $ this ->emojiHelper = $ this ->createMock (IEmojiHelper ::class);
7575
7676 $ this ->config = $ this ->createMock (IConfig::class);
7777
@@ -84,7 +84,7 @@ protected function setUp(): void {
8484 $ this ->service = new StatusService ($ this ->mapper ,
8585 $ this ->timeFactory ,
8686 $ this ->predefinedStatusService ,
87- $ this ->emojiService ,
87+ $ this ->emojiHelper ,
8888 $ this ->config );
8989 }
9090
@@ -138,7 +138,7 @@ public function testFindAllRecentStatusChangesNoEnumeration(): void {
138138 $ this ->service = new StatusService ($ this ->mapper ,
139139 $ this ->timeFactory ,
140140 $ this ->predefinedStatusService ,
141- $ this ->emojiService ,
141+ $ this ->emojiHelper ,
142142 $ this ->config );
143143
144144 $ this ->assertEquals ([], $ this ->service ->findAllRecentStatusChanges (20 , 50 ));
@@ -155,7 +155,7 @@ public function testFindAllRecentStatusChangesNoEnumeration(): void {
155155 $ this ->service = new StatusService ($ this ->mapper ,
156156 $ this ->timeFactory ,
157157 $ this ->predefinedStatusService ,
158- $ this ->emojiService ,
158+ $ this ->emojiHelper ,
159159 $ this ->config );
160160
161161 $ this ->assertEquals ([], $ this ->service ->findAllRecentStatusChanges (20 , 50 ));
@@ -519,7 +519,7 @@ public function testSetCustomMessage(string $userId,
519519 ->willThrowException (new DoesNotExistException ('' ));
520520 }
521521
522- $ this ->emojiService ->method ('isValidEmoji ' )
522+ $ this ->emojiHelper ->method ('isValidSingleEmoji ' )
523523 ->with ($ statusIcon )
524524 ->willReturn ($ supportsEmoji );
525525
0 commit comments