From 1bd52867fb463a4b34cd2c4a9b9ace8b570e18b4 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Tue, 23 Jul 2024 18:52:12 +0200 Subject: Fallback to english help topic if localized topic is not found. --- tests/unit/Module/HelpTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/unit/Module/HelpTest.php b/tests/unit/Module/HelpTest.php index 64e4a2663..2e5494f7c 100644 --- a/tests/unit/Module/HelpTest.php +++ b/tests/unit/Module/HelpTest.php @@ -103,6 +103,15 @@ class HelpTest extends \Zotlabs\Tests\Unit\Module\TestCase { $this->get('help/first'); } + public function test_fall_back_to_english_if_localized_topic_dont_exist(): void { + \App::$language = 'nb'; + + $stubs = $this->prepare_stubs('bb'); + $this->get('help/about/help_topic'); + + $this->assertPageContains('Hubzilla Documentation: About'); + } + public function test_includes(): void { // Stub `file_get_contents` to plant our own content. $fgc_stub = $this->getFunctionMock('Zotlabs\Module', 'file_get_contents'); -- cgit v1.2.3