diff --git a/bin/test.php b/bin/test.php index d5a78890793eb9e1ec525e8bbdadc13f60843ea8..c0713b82062c16426e161ac94863a51c580f4f2b 100755 --- a/bin/test.php +++ b/bin/test.php @@ -9,7 +9,18 @@ $tests = array(); -require_once('../config/test.php'); +/* The configuration file is relative to this script. */ +$configFile = dirname(dirname(__FILE__)) . '/config/test.php'; + +/* Check if the configuration file exists. */ +if(!file_exists($configFile)) { + echo('Missing configuration file: ' . $configFile . "\n"); + echo('Maybe you need to copy config/test-template.php to config/test.php and update it?.' . "\n"); + exit(1); +} + +/* Load the configuration file. */ +require_once($configFile); /** * This function creates a curl handle and initializes it.