1212use OCA \Files_External \Service \BackendService ;
1313use OCA \Files_External \Service \GlobalStoragesService ;
1414use OCA \Files_External \Settings \Admin ;
15- use OCP \App \IAppManager ;
1615use OCP \AppFramework \Http \TemplateResponse ;
1716use OCP \AppFramework \Services \IInitialState ;
1817use OCP \Encryption \IManager ;
18+ use OCP \IL10N ;
1919use OCP \IURLGenerator ;
2020use PHPUnit \Framework \MockObject \MockObject ;
2121use Test \TestCase ;
@@ -27,7 +27,7 @@ class AdminTest extends TestCase {
2727 private GlobalAuth &MockObject $ globalAuth ;
2828 private IInitialState &MockObject $ initialState ;
2929 private IURLGenerator &MockObject $ urlGenerator ;
30- private IAppManager &MockObject $ appManager ;
30+ private IL10N &MockObject $ l10n ;
3131 private Admin $ admin ;
3232
3333 protected function setUp (): void {
@@ -38,7 +38,10 @@ protected function setUp(): void {
3838 $ this ->globalAuth = $ this ->createMock (GlobalAuth::class);
3939 $ this ->initialState = $ this ->createMock (IInitialState::class);
4040 $ this ->urlGenerator = $ this ->createMock (IURLGenerator::class);
41- $ this ->appManager = $ this ->createMock (IAppManager::class);
41+ $ this ->l10n = $ this ->createMock (IL10N ::class);
42+ $ this ->l10n ->method ('t ' )->willReturnCallback (function ($ text ) {
43+ return $ text ;
44+ });
4245
4346 $ this ->admin = new Admin (
4447 $ this ->encryptionManager ,
@@ -47,7 +50,7 @@ protected function setUp(): void {
4750 $ this ->globalAuth ,
4851 $ this ->initialState ,
4952 $ this ->urlGenerator ,
50- $ this ->appManager ,
53+ $ this ->l10n ,
5154 );
5255 }
5356
0 commit comments