diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-01-15 10:32:26 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-01-15 10:32:26 +0100 |
commit | d1aac16a72c88c745d92a04ea0e3bed2fe51a78b (patch) | |
tree | 18127a3bb8d98323cd71dc70a213e06c0f09179a /apps/settings/tests | |
parent | bf59b637c59af029eb817270ce5f4da694996ae7 (diff) | |
download | nextcloud-server-d1aac16a72c88c745d92a04ea0e3bed2fe51a78b.tar.gz nextcloud-server-d1aac16a72c88c745d92a04ea0e3bed2fe51a78b.zip |
Fix AppDirsWithDifferentOwnerTest
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/settings/tests')
-rw-r--r-- | apps/settings/tests/Controller/CheckSetupControllerTest.php | 20 | ||||
-rw-r--r-- | apps/settings/tests/SetupChecks/AppDirsWithDifferentOwnerTest.php | 20 |
2 files changed, 20 insertions, 20 deletions
diff --git a/apps/settings/tests/Controller/CheckSetupControllerTest.php b/apps/settings/tests/Controller/CheckSetupControllerTest.php index c02bf66cf87..159e0a9358d 100644 --- a/apps/settings/tests/Controller/CheckSetupControllerTest.php +++ b/apps/settings/tests/Controller/CheckSetupControllerTest.php @@ -86,13 +86,6 @@ class CheckSetupControllerTest extends TestCase { /** @var ISetupCheckManager|MockObject */ private $setupCheckManager; - /** - * Holds a list of directories created during tests. - * - * @var array - */ - private $dirsToRemove = []; - protected function setUp(): void { parent::setUp(); @@ -145,19 +138,6 @@ class CheckSetupControllerTest extends TestCase { ])->getMock(); } - /** - * Removes directories created during tests. - * - * @after - * @return void - */ - public function removeTestDirectories() { - foreach ($this->dirsToRemove as $dirToRemove) { - rmdir($dirToRemove); - } - $this->dirsToRemove = []; - } - public function testCheck() { $this->config->expects($this->any()) ->method('getAppValue') diff --git a/apps/settings/tests/SetupChecks/AppDirsWithDifferentOwnerTest.php b/apps/settings/tests/SetupChecks/AppDirsWithDifferentOwnerTest.php index 06a75225cb4..9216be3ace5 100644 --- a/apps/settings/tests/SetupChecks/AppDirsWithDifferentOwnerTest.php +++ b/apps/settings/tests/SetupChecks/AppDirsWithDifferentOwnerTest.php @@ -33,6 +33,13 @@ class AppDirsWithDifferentOwnerTest extends TestCase { private IL10N $l10n; private AppDirsWithDifferentOwner $check; + /** + * Holds a list of directories created during tests. + * + * @var array + */ + private $dirsToRemove = []; + protected function setUp(): void { parent::setUp(); @@ -97,4 +104,17 @@ class AppDirsWithDifferentOwnerTest extends TestCase { $this->invokePrivate($this->check, 'getAppDirsWithDifferentOwner', [posix_getuid()]) ); } + + /** + * Removes directories created during tests. + * + * @after + * @return void + */ + public function removeTestDirectories() { + foreach ($this->dirsToRemove as $dirToRemove) { + rmdir($dirToRemove); + } + $this->dirsToRemove = []; + } } |