$this->assertTrue(is_bool(self::$configInstance->isEnabled('single_server')));
}
+ /**
+ * Tests if sorting the configuration array is always returning the same
+ * array (but sorted) back.
+ */
+ public function testConfigSortConfigurationArray () {
+ // First get configuration array
+ /* NOISY-DEBUG: */ printf('[%s:%d]: CALLED!' . PHP_EOL, __METHOD__, __LINE__);
+ $config = self::$configInstance->getConfigurationArray();
+
+ // Run sort method
+ /* NOISY-DEBUG: */ printf('[%s:%d]: config()=%d' . PHP_EOL, __METHOD__, __LINE__, count($config));
+ self::$configInstance->sortConfigurationArray();
+
+ // This should be an empty array
+ $diff = array_diff($config, self::$configInstance->getConfigurationArray());
+
+ // Check condition
+ /* NOISY-DEBUG: */ printf('[%s:%d]: diff()=%d' . PHP_EOL, __METHOD__, __LINE__, count($diff));
+ $this->assertTrue(count($diff) === 0);
+
+ // Trace message
+ /* NOISY-DEBUG: */ printf('[%s:%d]: EXIT!' . PHP_EOL, __METHOD__, __LINE__);
+ }
+
}