diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2024-07-23 18:52:12 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2024-07-23 18:52:12 +0200 |
commit | 1bd52867fb463a4b34cd2c4a9b9ace8b570e18b4 (patch) | |
tree | f4ed6334e7c6e7bb5c2b7250b8a61072332dd3b9 /tests | |
parent | 898fb4f80039bf1ec920f931d4e8c00162bf4ef8 (diff) | |
download | volse-hubzilla-1bd52867fb463a4b34cd2c4a9b9ace8b570e18b4.tar.gz volse-hubzilla-1bd52867fb463a4b34cd2c4a9b9ace8b570e18b4.tar.bz2 volse-hubzilla-1bd52867fb463a4b34cd2c4a9b9ace8b570e18b4.zip |
Fallback to english help topic if localized topic is not found.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/Module/HelpTest.php | 9 |
1 files changed, 9 insertions, 0 deletions
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'); |