コード例 #1
0
ファイル: SetConfig.php プロジェクト: dorelljames/piwik
 /**
  * @return ConfigSettingManipulation[]
  */
 private function getAssignments(InputInterface $input)
 {
     $assignments = $input->getArgument('assignment');
     $result = array();
     foreach ($assignments as $assignment) {
         $result[] = ConfigSettingManipulation::make($assignment);
     }
     return $result;
 }
コード例 #2
0
 /**
  * @dataProvider getTestDataForManipulate
  */
 public function test_manipulate_CorrectlyManipulatesConfig($sectionName, $name, $value, $isArrayAppend, $expectedConfig)
 {
     $manipulation = new ConfigSettingManipulation($sectionName, $name, $value, $isArrayAppend);
     $manipulation->manipulate($this->mockConfig);
     $this->assertEquals($expectedConfig, $this->mockConfig->mockConfigData);
 }