*/
public function isConfigurationEntrySet (string $configKey) {
// Is it null?
+ //* NOISY-DEBUG: */ printf('[%s:%d]: configKey=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $configKey);
if (empty($configKey)) {
// Entry is empty
throw new InvalidArgumentException('Parameter "configKey" is empty', self::EXCEPTION_CONFIG_KEY_IS_EMPTY);
$isset = ((isset(self::$configData[$configKey])) || (array_key_exists($configKey, self::$configData)));
// Return the result
+ //* NOISY-DEBUG: */ printf('[%s:%d]: isset=%s - EXIT!' . PHP_EOL, __METHOD__, __LINE__, intval($isset));
return $isset;
}
*
* @param $relativePath Relative path to test classes
* @return void
+ * @throws InvalidArgumentException If a parameter is invalid
*/
public static function registerTestsPath (string $relativePath) {
+ // Validate parameter
+ if (empty($relativePath)) {
+ // Should not be empty
+ throw new InvalidArgumentException('Parameter "relativePath" is empty');
+ }
+
// "Register" it
//* NOISY-DEBUG: */ printf('[%s:%d]: relativePath=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $relativePath);
self::$testPaths[$relativePath] = $relativePath;
* @param $basePath The relative base path to 'framework_base_path' constant for all classes
* @param $ignoreList An optional list (array forced) of directory and file names which shall be ignored
* @return void
+ * @throws InvalidArgumentException If a parameter is invalid
*/
protected function scanClassPath (string $basePath, array $ignoreList = [] ) {
// Is a list has been restored from cache, don't read it again
//* NOISY-DEBUG: */ printf('[%s:%d] basePath=%s,ignoreList()=%d - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $basePath, count($ignoreList));
- if ($this->listCached === true) {
+ if (empty($basePath)) {
+ // Throw IAE
+ throw new InvalidArgumentException('Parameter "basePath" is empty');
+ } elseif ($this->listCached === true) {
// Abort here
//* NOISY-DEBUG: */ printf('[%s:%d] this->listCache=true - EXIT!' . PHP_EOL, __METHOD__, __LINE__);
return;