Skip to content

Commit

Permalink
Unit test mock ConfigForceDatas : The config can be an object
Browse files Browse the repository at this point in the history
  • Loading branch information
bulton-fr committed Mar 20, 2017
1 parent 2a61edf commit dd4d329
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/unit/mocks/src/class/ConfigForceDatas.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ public function forceConfig($file, $newConfig)

public function updateKey($file, $configKey, $newValue)
{
$this->config[$file][$configKey] = $newValue;
if (is_array($this->config[$file])) {
$this->config[$file][$configKey] = $newValue;
} elseif (is_object($this->config[$file])) {
$this->config[$file]->$configKey = $newValue;
}
}
}

0 comments on commit dd4d329

Please sign in to comment.