Expand test coverage.

This commit is contained in:
James Cole
2019-07-26 17:48:24 +02:00
parent 6ff4a0b45c
commit d94d34ca63
57 changed files with 2243 additions and 1597 deletions

View File

@@ -204,32 +204,6 @@ trait GetConfigurationData
return $steps;
}
/**
* Check if forbidden functions are set.
*
* @return bool
*/
protected function hasForbiddenFunctions(): bool // validate system config
{
$list = ['proc_close'];
$forbidden = explode(',', ini_get('disable_functions'));
$trimmed = array_map(
function (string $value) {
return trim($value);
}, $forbidden
);
foreach ($list as $entry) {
if (in_array($entry, $trimmed, true)) {
Log::error('Method "%s" is FORBIDDEN, so the console command cannot be executed.');
return true;
}
}
return false;
}
/**
*
*/