mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
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 <come.chilliet@nextcloud.com>
This commit is contained in:
parent
3b128eb102
commit
72ccd53567
2 changed files with 1 additions and 29 deletions
|
|
@ -51,7 +51,7 @@ class AppConfigTest extends TestCase {
|
|||
|
||||
protected function getAppConfig($cached = false): AppConfig {
|
||||
$this->config->method('getSystemValueBool')
|
||||
->with('cache_app_config', $cached)
|
||||
->with('cache_app_config', true)
|
||||
->willReturn(true);
|
||||
$this->cacheFactory->method('isLocalCacheAvailable')->willReturn($cached);
|
||||
if ($cached) {
|
||||
|
|
|
|||
|
|
@ -10,12 +10,10 @@ namespace Tests\lib\Config;
|
|||
use OC\AppConfig;
|
||||
use OC\AppFramework\Bootstrap\Coordinator;
|
||||
use OC\Config\ConfigManager;
|
||||
use OC\Config\PresetManager;
|
||||
use OCP\App\IAppManager;
|
||||
use OCP\Config\Exceptions\TypeConflictException;
|
||||
use OCP\Config\Exceptions\UnknownKeyException;
|
||||
use OCP\Config\IUserConfig;
|
||||
use OCP\Config\Lexicon\Preset;
|
||||
use OCP\Exceptions\AppConfigTypeConflictException;
|
||||
use OCP\Exceptions\AppConfigUnknownKeyException;
|
||||
use OCP\IAppConfig;
|
||||
|
|
@ -34,7 +32,6 @@ class LexiconTest extends TestCase {
|
|||
private IAppConfig $appConfig;
|
||||
private IUserConfig $userConfig;
|
||||
private ConfigManager $configManager;
|
||||
private PresetManager $presetManager;
|
||||
private IAppManager $appManager;
|
||||
|
||||
protected function setUp(): void {
|
||||
|
|
@ -49,7 +46,6 @@ class LexiconTest extends TestCase {
|
|||
$this->appConfig = Server::get(IAppConfig::class);
|
||||
$this->userConfig = Server::get(IUserConfig::class);
|
||||
$this->configManager = Server::get(ConfigManager::class);
|
||||
$this->presetManager = Server::get(PresetManager::class);
|
||||
$this->appManager = Server::get(IAppManager::class);
|
||||
}
|
||||
|
||||
|
|
@ -215,30 +211,6 @@ class LexiconTest extends TestCase {
|
|||
$this->assertSame(false, $this->appConfig->getValueBool(TestConfigLexicon_I::APPID, 'key4'));
|
||||
}
|
||||
|
||||
public function testAppConfigLexiconPreset() {
|
||||
$this->presetManager->setLexiconPreset(Preset::FAMILY);
|
||||
$this->assertSame('family', $this->appConfig->getValueString(TestLexicon_E::APPID, 'key3'));
|
||||
}
|
||||
|
||||
public function testAppConfigLexiconPresets() {
|
||||
$this->presetManager->setLexiconPreset(Preset::MEDIUM);
|
||||
$this->assertSame('club+medium', $this->appConfig->getValueString(TestLexicon_E::APPID, 'key3'));
|
||||
$this->presetManager->setLexiconPreset(Preset::FAMILY);
|
||||
$this->assertSame('family', $this->appConfig->getValueString(TestLexicon_E::APPID, 'key3'));
|
||||
}
|
||||
|
||||
public function testUserConfigLexiconPreset() {
|
||||
$this->presetManager->setLexiconPreset(Preset::FAMILY);
|
||||
$this->assertSame('family', $this->userConfig->getValueString('user1', TestLexicon_E::APPID, 'key3'));
|
||||
}
|
||||
|
||||
public function testUserConfigLexiconPresets() {
|
||||
$this->presetManager->setLexiconPreset(Preset::MEDIUM);
|
||||
$this->assertSame('club+medium', $this->userConfig->getValueString('user1', TestLexicon_E::APPID, 'key3'));
|
||||
$this->presetManager->setLexiconPreset(Preset::FAMILY);
|
||||
$this->assertSame('family', $this->userConfig->getValueString('user1', TestLexicon_E::APPID, 'key3'));
|
||||
}
|
||||
|
||||
public function testLexiconIndexedUpdate() {
|
||||
$this->userConfig->setValueString('user1', TestLexicon_UserIndexed::APPID, 'key1', 'abcd');
|
||||
$this->userConfig->setValueString('user2', TestLexicon_UserIndexed::APPID, 'key1', '1234', flags: 64);
|
||||
|
|
|
|||
Loading…
Reference in a new issue