/**
  * @return void
  */
 public function ProcessPageLoad()
 {
     $this->Set('IsConfigFileWritable', true);
     $this->presenter->PageLoad();
     $this->Set('Settings', $this->settings);
     $this->Set('SectionSettings', $this->sectionSettings);
     $this->PopulateTimezones();
     $this->Set('Languages', Resources::GetInstance()->AvailableLanguages);
     $this->Set('SettingNames', $this->settingNames->ToString());
     $this->Display('Admin/Configuration/manage_configuration.tpl');
 }
 public function testUpdatesConfigFileWithSettings()
 {
     $setting1 = ConfigSetting::ParseForm('key1|', 'true');
     $setting2 = ConfigSetting::ParseForm('key2|section1', '10');
     $setting3 = ConfigSetting::ParseForm('key3|section1', 'some string');
     $expectedSettings['key1'] = 'true';
     $expectedSettings['section1']['key2'] = '10';
     $expectedSettings['section1']['key3'] = 'some string';
     $existingValues['oldKey1'] = 'old1';
     $existingValues['section2']['oldKey2'] = 'old2';
     $newSettings['key1'] = 'true';
     $newSettings['section1']['key2'] = '10';
     $newSettings['section1']['key3'] = 'some string';
     $newSettings['oldKey1'] = 'old1';
     $newSettings['section2']['oldKey2'] = 'old2';
     $this->page->_SubmittedSettings = array($setting1, $setting2, $setting3);
     $this->configSettings->expects($this->once())->method('GetSettings')->with($this->equalTo($this->configFilePath))->will($this->returnValue($existingValues));
     $this->configSettings->expects($this->once())->method('WriteSettings')->with($this->equalTo($this->configFilePath), $this->equalTo($newSettings));
     $this->presenter->Update();
 }