Task: #53687 Handle missing mode fallback and add no-mode cfg tests

This commit is contained in:
Alejandro Sosa 2026-03-26 09:31:07 +01:00
commit adf5a98768
5 changed files with 45 additions and 3 deletions

View file

@ -192,6 +192,15 @@ class SettingsTest extends TestCase
$cfg = $this->appPath($cfg, 'localOverride')->load();
$this->assertEquals(42, $cfg->answer);
}
public function testLoadWithoutModeFallsBackToFirstKnownMode(): void
{
$cfg = new Settings();
$cfg = $this->appPath($cfg, 'noMode')->load();
$this->assertEquals('prod', $cfg->mode);
$this->assertEquals('default', $cfg->testFiles);
}
/**
* @dataProvider fileNameData