* [MOD] Unit testing. Work in progress

This commit is contained in:
nuxsmin
2018-07-23 22:12:45 +02:00
parent 0960760532
commit fc5f5fec01
4 changed files with 289 additions and 2 deletions

View File

@@ -52,6 +52,7 @@ require APP_ROOT . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'BaseFunc
print 'APP_ROOT=' . APP_ROOT . PHP_EOL;
print 'TEST_ROOT=' . TEST_ROOT . PHP_EOL;
print 'SELF_IP_ADDRESS=' . SELF_IP_ADDRESS . PHP_EOL;
// Setup directories
if (!is_dir(TMP_DIR)) {
@@ -94,7 +95,7 @@ if (!function_exists('\gettext')) {
*/
function getRealIpAddress()
{
return trim(shell_exec('ip a s eth0 | awk \'$1 == "inet" {print $2}\' | cut -d"/" -f1'));
return trim(shell_exec('ip a s eth0 | awk \'$1 == "inet" {print $2}\' | cut -d"/" -f1')) ?: '127.0.0.1';
}
/**