public function loadConfig($fileName, $type = 'app')
{
$found = false;
if ($type == 'app') {
$folder = APP . 'Test' . DS . 'Config' . DS;
} else {
$folder = App::pluginPath($type);
if (!empty($folder)) {
$folder .= 'Test' . DS . 'Config' . DS;
} else {
return false;
}
}
if (file_exists($folder . $fileName . '.php')) {
include $folder . $fileName . '.php';
$found = true;
}
if (!$found) {
return false;
}
if (!isset($config)) {
$error = __("AppTestCase::load() - no variable \$config found in %s.php", true);
trigger_error(sprintf($error, $fileName), E_USER_WARNING);
return false;
}
return $config;
}