This method is a wrapper for the ini_set() function that automatically resets the modified php.ini setting to its original value after the test is run.
@since Method available since Release 3.0.0
string $varName:
string $newValue:
protected function iniSet($varName, $newValue) {
if (!is_string($varName)) {
throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
}
$currentValue = ini_set($varName, $newValue);
if ($currentValue !== FALSE) {
$this->iniSettings[$varName] = $currentValue;
}
else {
throw new PHPUnit_Framework_Exception(sprintf('INI setting "%s" could not be set to "%s".', $varName, $newValue));
}
}