public function testSetConfigValue()
{
$config = $this->createConfig(['issue_trackers' => []]);
$this->assertNull($config->get('repo_adapter'));
$config->set('repo_adapter', 'github', Config::CONFIG_SYSTEM);
$config->set('issue_adapter', 'github', Config::CONFIG_SYSTEM);
$config->set('adapters', ['github' => ['base_url' => 'url']], Config::CONFIG_SYSTEM);
$this->assertEquals('github', $config->get('repo_adapter'));
$this->assertEquals('github', $config->get('issue_adapter'));
$this->assertEquals(['github' => ['base_url' => 'url']], $config->get('adapters'));
$this->assertTrue($config->has('issue_adapter', Config::CONFIG_SYSTEM));
$this->assertNull($config->get('issue_adapter', Config::CONFIG_LOCAL));
$this->assertFalse($config->has('issue_adapter', Config::CONFIG_LOCAL));
// Ensure original options are not lost
$this->assertEquals([], $config->get('issue_trackers', Config::CONFIG_ALL));
$this->assertEquals([], $config->get('issue_trackers', Config::CONFIG_SYSTEM));
}