|
9 | 9 |
|
10 | 10 | namespace OCA\Theming\Tests\Migration; |
11 | 11 |
|
12 | | -use NCU\Config\IUserConfig; |
13 | 12 | use OCA\Theming\Migration\Version2006Date20240905111627; |
14 | 13 | use OCP\BackgroundJob\IJobList; |
15 | 14 | use OCP\IAppConfig; |
| 15 | +use OCP\IConfig; |
16 | 16 | use OCP\IDBConnection; |
17 | 17 | use OCP\IUserManager; |
18 | 18 | use OCP\Migration\IOutput; |
@@ -92,8 +92,8 @@ public function testRestoreUserColors(): void { |
92 | 92 | $user = $manager->createUser('theming_legacy', 'theming_legacy'); |
93 | 93 | self::assertNotFalse($user); |
94 | 94 | // Set the users theming value to legacy key |
95 | | - $config = \OCP\Server::get(IUserConfig::class); |
96 | | - $config->setValueString('theming_legacy', 'theming', 'background_color', 'ffab00'); |
| 95 | + $config = \OCP\Server::get(IConfig::class); |
| 96 | + $config->setUserValue($user->getUID(), 'theming', 'background_color', 'ffab00'); |
97 | 97 |
|
98 | 98 | // expect some output |
99 | 99 | $output = $this->createMock(IOutput::class); |
@@ -144,10 +144,10 @@ public function testRestoreUserColorsWithConflicts(): void { |
144 | 144 | $user = $manager->createUser('theming_no_legacy', 'theming_no_legacy'); |
145 | 145 | self::assertNotFalse($user); |
146 | 146 | // Set the users theming value to legacy key |
147 | | - $config = \OCP\Server::get(IUserConfig::class); |
148 | | - $config->setValueString($user->getUID(), 'theming', 'primary_color', '999999'); |
149 | | - $config->setValueString($user->getUID(), 'theming', 'background_color', '111111'); |
150 | | - $config->setValueString($legacyUser->getUID(), 'theming', 'background_color', 'ffab00'); |
| 147 | + $config = \OCP\Server::get(IConfig::class); |
| 148 | + $config->setUserValue($user->getUID(), 'theming', 'primary_color', '999999'); |
| 149 | + $config->setUserValue($user->getUID(), 'theming', 'background_color', '111111'); |
| 150 | + $config->setUserValue($legacyUser->getUID(), 'theming', 'background_color', 'ffab00'); |
151 | 151 |
|
152 | 152 | // expect some output |
153 | 153 | $output = $this->createMock(IOutput::class); |
|
0 commit comments