public function testSetWorkingCopySetting()
 {
     $this->configEditor->get('global-settings.sample_name', '')->willReturn('global_value');
     $setting_name = 'path-settings[svn://localhost].sample_name';
     $this->configEditor->get($setting_name)->willReturn('old_value');
     $this->configEditor->set($setting_name, 'new_value')->will(function (array $args, $object) {
         $object->get($args[0])->willReturn($args[1]);
     });
     $this->command->getConfigSettings()->willReturn(array(new StringConfigSetting('sample_name', '', AbstractConfigSetting::SCOPE_WORKING_COPY)));
     $this->workingCopyResolver->getWorkingCopyUrl('/path/to/working-copy')->willReturn('svn://localhost');
     $this->commandConfig->setSettingValue('sample_name', $this->command->reveal(), '/path/to/working-copy', 'new_value');
     $this->assertEquals('new_value', $this->commandConfig->getSettingValue('sample_name', $this->command->reveal(), '/path/to/working-copy'));
 }
 /**
  * Returns previously recoded conflicts.
  *
  * @param string $wc_path Working copy path.
  *
  * @return array
  */
 public function getRecordedConflicts($wc_path)
 {
     return $this->commandConfig->getSettingValue(ConflictsCommand::SETTING_CONFLICTS_RECORDED_CONFLICTS, $this->conflictsCommand, $wc_path);
 }
Exemplo n.º 3
0
 /**
  * Returns command setting value.
  *
  * @param string $name Name.
  *
  * @return mixed
  */
 protected function getSetting($name)
 {
     return $this->_commandConfig->getSettingValue($name, $this, $this->getRawPath());
 }