@@ -56,31 +56,31 @@ public static function setUpBeforeClass(): void {
5656 parent ::setUpBeforeClass ();
5757 $ backend = new Dummy ();
5858 $ backend ->createUser (self ::TEST_USER1 , self ::TEST_USER1 );
59- \OC :: $ server -> get (\OCP \IUserManager::class)->registerBackend ($ backend );
59+ \OCP \Server:: get (\OCP \IUserManager::class)->registerBackend ($ backend );
6060 }
6161
6262 protected function setUp (): void {
6363 parent ::setUp ();
6464
6565 $ this ->loginAsUser (self ::TEST_USER1 );
6666
67- $ this ->openAiSettingsService = \OC :: $ server -> get (OpenAiSettingsService::class);
67+ $ this ->openAiSettingsService = \OCP \Server:: get (OpenAiSettingsService::class);
6868
69- $ this ->chunkService = \OC :: $ server -> get (ChunkService::class);
69+ $ this ->chunkService = \OCP \Server:: get (ChunkService::class);
7070
71- $ this ->quotaUsageMapper = \OC :: $ server -> get (QuotaUsageMapper::class);
71+ $ this ->quotaUsageMapper = \OCP \Server:: get (QuotaUsageMapper::class);
7272
7373 // We'll hijack the client service and subsequently iClient to return a mock response from the OpenAI API
7474 $ clientService = $ this ->createMock (IClientService::class);
7575 $ this ->iClient = $ this ->createMock (IClient::class);
7676 $ clientService ->method ('newClient ' )->willReturn ($ this ->iClient );
7777
7878 $ this ->openAiApiService = new OpenAiAPIService (
79- \OC :: $ server -> get (\Psr \Log \LoggerInterface::class),
79+ \OCP \Server:: get (\Psr \Log \LoggerInterface::class),
8080 $ this ->createMock (\OCP \IL10N ::class),
81- \OC :: $ server -> get (IAppConfig::class),
82- \OC :: $ server -> get (ICacheFactory::class),
83- \OC :: $ server -> get (QuotaUsageMapper::class),
81+ \OCP \Server:: get (IAppConfig::class),
82+ \OCP \Server:: get (ICacheFactory::class),
83+ \OCP \Server:: get (QuotaUsageMapper::class),
8484 $ this ->openAiSettingsService ,
8585 $ this ->createMock (\OCP \Notification \IManager::class),
8686 $ clientService ,
@@ -91,7 +91,7 @@ protected function setUp(): void {
9191
9292 public static function tearDownAfterClass (): void {
9393 // Delete quota usage for test user
94- $ quotaUsageMapper = \OC :: $ server -> get (QuotaUsageMapper::class);
94+ $ quotaUsageMapper = \OCP \Server:: get (QuotaUsageMapper::class);
9595 try {
9696 $ quotaUsageMapper ->deleteUserQuotaUsages (self ::TEST_USER1 );
9797 } catch (\OCP \Db \Exception |\RuntimeException |\Exception |\Throwable $ e ) {
@@ -100,15 +100,15 @@ public static function tearDownAfterClass(): void {
100100
101101 $ backend = new \Test \Util \User \Dummy ();
102102 $ backend ->deleteUser (self ::TEST_USER1 );
103- \OC :: $ server -> get (\OCP \IUserManager::class)->removeBackend ($ backend );
103+ \OCP \Server:: get (\OCP \IUserManager::class)->removeBackend ($ backend );
104104
105105 parent ::tearDownAfterClass ();
106106 }
107107
108108 public function testFreePromptProvider (): void {
109109 $ freePromptProvider = new TextToTextProvider (
110110 $ this ->openAiApiService ,
111- \OC :: $ server -> get (IAppConfig::class),
111+ \OCP \Server:: get (IAppConfig::class),
112112 $ this ->openAiSettingsService ,
113113 $ this ->createMock (\OCP \IL10N ::class),
114114 self ::TEST_USER1 ,
@@ -171,7 +171,7 @@ public function testFreePromptProvider(): void {
171171 public function testEmojiProvider (): void {
172172 $ emojiProvider = new EmojiProvider (
173173 $ this ->openAiApiService ,
174- \OC :: $ server -> get (IAppConfig::class),
174+ \OCP \Server:: get (IAppConfig::class),
175175 $ this ->openAiSettingsService ,
176176 $ this ->createMock (\OCP \IL10N ::class),
177177 self ::TEST_USER1 ,
@@ -236,7 +236,7 @@ public function testEmojiProvider(): void {
236236 public function testHeadlineProvider (): void {
237237 $ headlineProvider = new HeadlineProvider (
238238 $ this ->openAiApiService ,
239- \OC :: $ server -> get (IAppConfig::class),
239+ \OCP \Server:: get (IAppConfig::class),
240240 $ this ->openAiSettingsService ,
241241 $ this ->createMock (\OCP \IL10N ::class),
242242 self ::TEST_USER1 ,
@@ -300,7 +300,7 @@ public function testHeadlineProvider(): void {
300300 public function testChangeToneProvider (): void {
301301 $ changeToneProvider = new ChangeToneProvider (
302302 $ this ->openAiApiService ,
303- \OC :: $ server -> get (IAppConfig::class),
303+ \OCP \Server:: get (IAppConfig::class),
304304 $ this ->openAiSettingsService ,
305305 $ this ->createMock (\OCP \IL10N ::class),
306306 $ this ->chunkService ,
@@ -367,7 +367,7 @@ public function testChangeToneProvider(): void {
367367 public function testSummaryProvider (): void {
368368 $ summaryProvider = new SummaryProvider (
369369 $ this ->openAiApiService ,
370- \OC :: $ server -> get (IAppConfig::class),
370+ \OCP \Server:: get (IAppConfig::class),
371371 $ this ->openAiSettingsService ,
372372 $ this ->createMock (\OCP \IL10N ::class),
373373 $ this ->chunkService ,
@@ -436,7 +436,7 @@ public function testSummaryProvider(): void {
436436 public function testProofreadProvider (): void {
437437 $ proofreadProvider = new ProofreadProvider (
438438 $ this ->openAiApiService ,
439- \OC :: $ server -> get (IAppConfig::class),
439+ \OCP \Server:: get (IAppConfig::class),
440440 $ this ->openAiSettingsService ,
441441 $ this ->createMock (\OCP \IL10N ::class),
442442 $ this ->chunkService ,
@@ -504,10 +504,10 @@ public function testProofreadProvider(): void {
504504 public function testTranslationProvider (): void {
505505 $ translationProvider = new TranslateProvider (
506506 $ this ->openAiApiService ,
507- \OC :: $ server -> get (IAppConfig::class),
507+ \OCP \Server:: get (IAppConfig::class),
508508 $ this ->openAiSettingsService ,
509509 $ this ->createMock (\OCP \IL10N ::class),
510- \OC :: $ server -> get (\OCP \L10N \IFactory::class),
510+ \OCP \Server:: get (\OCP \L10N \IFactory::class),
511511 $ this ->createMock (\OCP \ICacheFactory::class),
512512 $ this ->createMock (\Psr \Log \LoggerInterface::class),
513513 $ this ->chunkService ,
@@ -577,7 +577,7 @@ public function testTextToSpeechProvider(): void {
577577 $ this ->openAiApiService ,
578578 $ this ->createMock (\OCP \IL10N ::class),
579579 $ this ->createMock (\Psr \Log \LoggerInterface::class),
580- \OC :: $ server -> get (IAppConfig::class),
580+ \OCP \Server:: get (IAppConfig::class),
581581 self ::TEST_USER1 ,
582582 );
583583
0 commit comments