1010
1111use OCA \Settings \SetupChecks \AppDirsWithDifferentOwner ;
1212use OCP \IL10N ;
13+ use PHPUnit \Framework \MockObject \MockObject ;
1314use Test \TestCase ;
1415
1516class AppDirsWithDifferentOwnerTest extends TestCase {
16- private IL10N $ l10n ;
1717 private AppDirsWithDifferentOwner $ check ;
1818
19+ private IL10N &MockObject $ l10n ;
20+
1921 /**
2022 * Holds a list of directories created during tests.
2123 *
@@ -42,8 +44,6 @@ protected function setUp(): void {
4244 * Then calls the 'getAppDirsWithDifferentOwner' method.
4345 * The result is expected to be empty since
4446 * there are no directories with different owners than the current user.
45- *
46- * @return void
4747 */
4848 public function testAppDirectoryOwnersOk (): void {
4949 $ tempDir = tempnam (sys_get_temp_dir (), 'apps ' ) . 'dir ' ;
@@ -69,8 +69,6 @@ public function testAppDirectoryOwnersOk(): void {
6969 /**
7070 * Calls the check for a none existing app root that is marked as not writable.
7171 * It's expected that no error happens since the check shouldn't apply.
72- *
73- * @return void
7472 */
7573 public function testAppDirectoryOwnersNotWritable (): void {
7674 $ tempDir = tempnam (sys_get_temp_dir (), 'apps ' ) . 'dir ' ;
@@ -89,11 +87,9 @@ public function testAppDirectoryOwnersNotWritable(): void {
8987
9088 /**
9189 * Removes directories created during tests.
92- *
93- * @after
94- * @return void
9590 */
96- public function removeTestDirectories () {
91+ #[\PHPUnit \Framework \Attributes \After()]
92+ public function removeTestDirectories (): void {
9793 foreach ($ this ->dirsToRemove as $ dirToRemove ) {
9894 rmdir ($ dirToRemove );
9995 }
0 commit comments