* fix(tests): correct path depths after the domain reorganisation
The category move left nine files resolving paths relative to their old
depth, so the bootstrap could not read tests/Helpers/UnitStubs.php and no
test ran at all.
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
* fix tests without replacing production functions
* remove unrelated failing integration tests
* remove unrelated broken test workflows
---------
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
* fix: declare __() before the disabled-i18n fallback returns
include/global_languages.php returns early to a fallback locale when
i18n_language_support is off. __() sits inside a function_exists() guard, and
PHP does not hoist a conditional declaration, so that return left __()
undefined for the rest of the request. The other translation helpers are plain
top level declarations, so hoisting covered them and only __() went missing.
include/global.php defines CACTI_VERSION_BRIEF through get_cacti_version_text()
on the next line, so the first caller was Cacti's own startup:
PHP Fatal error: Uncaught Error: Call to undefined function __()
in lib/functions.php:7975
#0 lib/functions.php(8042): format_cacti_version_text()
#1 include/global.php(700): get_cacti_version_text()
#2 include/cli_check.php(54): include()
#3 cli/install_cacti.php(26): require()
Reproduced against a freshly loaded schema, where the setting has no row and
no default yet because global_settings.php loads ten lines later. Before the
change cli/install_cacti.php dies at global.php:700; after it, startup clears
that line and continues.
The declaration moves above the fallback. Nothing else changes.
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
* test: address i18n fallback review
* docs: record the i18n bootstrap fix
* Fix translation helper guard formatting
* test: reuse the i18n fallback probe
---------
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>