Skip to content

Commit 027bb14

Browse files
committed
chore: Remove broken PresetManager tests
Those are not Unit tests but integration tests with bad side effects on other tests. I failed to clean them up so removing them. Signed-off-by: Côme Chilliet <[email protected]>
1 parent fae36e0 commit 027bb14

File tree

2 files changed

+1
-29
lines changed

2 files changed

+1
-29
lines changed

tests/lib/AppConfigTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected function setUp(): void {
5151

5252
protected function getAppConfig($cached = false): AppConfig {
5353
$this->config->method('getSystemValueBool')
54-
->with('cache_app_config', $cached)
54+
->with('cache_app_config', true)
5555
->willReturn(true);
5656
$this->cacheFactory->method('isLocalCacheAvailable')->willReturn($cached);
5757
if ($cached) {

tests/lib/Config/LexiconTest.php

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@
1010
use OC\AppConfig;
1111
use OC\AppFramework\Bootstrap\Coordinator;
1212
use OC\Config\ConfigManager;
13-
use OC\Config\PresetManager;
1413
use OCP\App\IAppManager;
1514
use OCP\Config\Exceptions\TypeConflictException;
1615
use OCP\Config\Exceptions\UnknownKeyException;
1716
use OCP\Config\IUserConfig;
18-
use OCP\Config\Lexicon\Preset;
1917
use OCP\Exceptions\AppConfigTypeConflictException;
2018
use OCP\Exceptions\AppConfigUnknownKeyException;
2119
use OCP\IAppConfig;
@@ -34,7 +32,6 @@ class LexiconTest extends TestCase {
3432
private IAppConfig $appConfig;
3533
private IUserConfig $userConfig;
3634
private ConfigManager $configManager;
37-
private PresetManager $presetManager;
3835
private IAppManager $appManager;
3936

4037
protected function setUp(): void {
@@ -49,7 +46,6 @@ protected function setUp(): void {
4946
$this->appConfig = Server::get(IAppConfig::class);
5047
$this->userConfig = Server::get(IUserConfig::class);
5148
$this->configManager = Server::get(ConfigManager::class);
52-
$this->presetManager = Server::get(PresetManager::class);
5349
$this->appManager = Server::get(IAppManager::class);
5450
}
5551

@@ -215,30 +211,6 @@ public function testAppConfigLexiconRenameInvertBoolean() {
215211
$this->assertSame(false, $this->appConfig->getValueBool(TestConfigLexicon_I::APPID, 'key4'));
216212
}
217213

218-
public function testAppConfigLexiconPreset() {
219-
$this->presetManager->setLexiconPreset(Preset::FAMILY);
220-
$this->assertSame('family', $this->appConfig->getValueString(TestLexicon_E::APPID, 'key3'));
221-
}
222-
223-
public function testAppConfigLexiconPresets() {
224-
$this->presetManager->setLexiconPreset(Preset::MEDIUM);
225-
$this->assertSame('club+medium', $this->appConfig->getValueString(TestLexicon_E::APPID, 'key3'));
226-
$this->presetManager->setLexiconPreset(Preset::FAMILY);
227-
$this->assertSame('family', $this->appConfig->getValueString(TestLexicon_E::APPID, 'key3'));
228-
}
229-
230-
public function testUserConfigLexiconPreset() {
231-
$this->presetManager->setLexiconPreset(Preset::FAMILY);
232-
$this->assertSame('family', $this->userConfig->getValueString('user1', TestLexicon_E::APPID, 'key3'));
233-
}
234-
235-
public function testUserConfigLexiconPresets() {
236-
$this->presetManager->setLexiconPreset(Preset::MEDIUM);
237-
$this->assertSame('club+medium', $this->userConfig->getValueString('user1', TestLexicon_E::APPID, 'key3'));
238-
$this->presetManager->setLexiconPreset(Preset::FAMILY);
239-
$this->assertSame('family', $this->userConfig->getValueString('user1', TestLexicon_E::APPID, 'key3'));
240-
}
241-
242214
public function testLexiconIndexedUpdate() {
243215
$this->userConfig->setValueString('user1', TestLexicon_UserIndexed::APPID, 'key1', 'abcd');
244216
$this->userConfig->setValueString('user2', TestLexicon_UserIndexed::APPID, 'key1', '1234', flags: 64);

0 commit comments

Comments
 (0)