@@ -89,7 +89,7 @@ public function testExecute($newRoot, $answer, $successMoveKey): void {
8989					$ this util ,
9090					$ this questionHelper 
9191				]
92- 			)->setMethods (['moveAllKeys ' ])->getMock ();
92+ 			)->onlyMethods (['moveAllKeys ' ])->getMock ();
9393
9494		$ this util ->expects ($ this once ())->method ('getKeyStorageRoot ' )
9595			->willReturn ('' );
@@ -122,7 +122,7 @@ public function testExecute($newRoot, $answer, $successMoveKey): void {
122122		);
123123	}
124124
125- 	public  function  dataTestExecute () {
125+ 	public  static   function  dataTestExecute ():  array  {
126126		return  [
127127			[null , true , true ],
128128			[null , true , false ],
@@ -143,7 +143,7 @@ public function testMoveAllKeys(): void {
143143					$ this util ,
144144					$ this questionHelper 
145145				]
146- 			)->setMethods (['prepareNewRoot ' , 'moveSystemKeys ' , 'moveUserKeys ' ])->getMock ();
146+ 			)->onlyMethods (['prepareNewRoot ' , 'moveSystemKeys ' , 'moveUserKeys ' ])->getMock ();
147147
148148		$ changeKeyStorageRootexpects ($ this once ())->method ('prepareNewRoot ' )->with ('newRoot ' );
149149		$ changeKeyStorageRootexpects ($ this once ())->method ('moveSystemKeys ' )->with ('oldRoot ' , 'newRoot ' );
@@ -179,7 +179,7 @@ public function testPrepareNewRootException($dirExists, $couldCreateFile): void
179179		$ this invokePrivate ($ this changeKeyStorageRoot , 'prepareNewRoot ' , ['newRoot ' ]);
180180	}
181181
182- 	public  function  dataTestPrepareNewRootException () {
182+ 	public  static   function  dataTestPrepareNewRootException ():  array  {
183183		return  [
184184			[true , false ],
185185			[true , null ],
@@ -204,7 +204,7 @@ public function testMoveSystemKeys($dirExists, $targetExists, $executeRename): v
204204					$ this util ,
205205					$ this questionHelper 
206206				]
207- 			)->setMethods (['targetExists ' ])->getMock ();
207+ 			)->onlyMethods (['targetExists ' ])->getMock ();
208208
209209		$ this view ->expects ($ this once ())->method ('is_dir ' )
210210			->with ('oldRoot/files_encryption ' )->willReturn ($ dirExists
@@ -221,7 +221,7 @@ public function testMoveSystemKeys($dirExists, $targetExists, $executeRename): v
221221		$ this invokePrivate ($ changeKeyStorageRoot'moveSystemKeys ' , ['oldRoot ' , 'newRoot ' ]);
222222	}
223223
224- 	public  function  dataTestMoveSystemKeys () {
224+ 	public  static   function  dataTestMoveSystemKeys ():  array  {
225225		return  [
226226			[true , false , true ],
227227			[false , true , false ],
@@ -241,7 +241,7 @@ public function testMoveUserKeys(): void {
241241					$ this util ,
242242					$ this questionHelper 
243243				]
244- 			)->setMethods (['setupUserFS ' , 'moveUserEncryptionFolder ' ])->getMock ();
244+ 			)->onlyMethods (['setupUserFS ' , 'moveUserEncryptionFolder ' ])->getMock ();
245245
246246		$ this userManager ->expects ($ this once ())->method ('getBackends ' )
247247			->willReturn ([$ this userInterface ]);
@@ -271,7 +271,7 @@ public function testMoveUserEncryptionFolder($userExists, $isDir, $targetExists,
271271					$ this util ,
272272					$ this questionHelper 
273273				]
274- 			)->setMethods (['targetExists ' , 'prepareParentFolder ' ])->getMock ();
274+ 			)->onlyMethods (['targetExists ' , 'prepareParentFolder ' ])->getMock ();
275275
276276		$ this userManager ->expects ($ this once ())->method ('userExists ' )
277277			->willReturn ($ userExists
@@ -293,7 +293,7 @@ public function testMoveUserEncryptionFolder($userExists, $isDir, $targetExists,
293293		$ this invokePrivate ($ changeKeyStorageRoot'moveUserEncryptionFolder ' , ['user1 ' , 'oldRoot ' , 'newRoot ' ]);
294294	}
295295
296- 	public  function  dataTestMoveUserEncryptionFolder () {
296+ 	public  static   function  dataTestMoveUserEncryptionFolder ():  array  {
297297		return  [
298298			[true , true , false , true ],
299299			[true , false , true , false ],
@@ -334,7 +334,7 @@ function ($fileExistsPath) use ($path, $pathExists) {
334334		);
335335	}
336336
337- 	public  function  dataTestPrepareParentFolder () {
337+ 	public  static   function  dataTestPrepareParentFolder ():  array  {
338338		return  [
339339			['/user/folder/sub_folder/keystorage ' , true ],
340340			['/user/folder/sub_folder/keystorage ' , false ]
0 commit comments