namespace CoreFramework\Configuration;
// Inport framework stuff
+use CoreFramework\Console\Tools\ConsoleTools;
use CoreFramework\Loader\ClassLoader;
use CoreFramework\Generic\NullPointerException;
*/
private static $configInstance = NULL;
+ /**
+ * Own IP address
+ */
+ private static $ipAddress = FALSE;
+
/**
* Setup test case
*/
*/
ClassLoader::enableStrictNamingConventionCheck(FALSE);
+ // Quiet DNS resolver as this is not wanted here
+ self::$configInstance->setConfigEntry('quiet_dns_resolver', TRUE);
+
+ // Lookup own IP address
+ self::$ipAddress = ConsoleTools::acquireSelfIpAddress();
+
// Trace message
//* NOISY-DEBUG: */ printf('[%s:%d]: EXIT!' . PHP_EOL, __METHOD__, __LINE__);
}
$serverAddress = self::$configInstance->detectServerAddress();
// Should be the same
- $this->assertEquals('127.0.0.1', $serverAddress);
+ $this->assertEquals(self::$ipAddress, $serverAddress);
}
/**
$serverAddress = self::$configInstance->detectServerAddress();
// Should be the same
- $this->assertEquals('127.0.0.1', $serverAddress);
+ $this->assertEquals(self::$ipAddress, $serverAddress);
}
/**
// Should be equal
$this->assertEquals('127.0.0.1', $serverAddress);
+
+ // Set old back
+ self::$configInstance->setServerAddress(self::$ipAddress);
}
}