Skip to content

Commit 35a98fa

Browse files
committed
test: fixed some tests
1 parent 26e0b4e commit 35a98fa

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

phpmyfaq/admin/assets/src/content/editor.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ const mockEditorInstance = {
5353
vi.mock('jodit', () => ({
5454
Jodit: {
5555
make: vi.fn(() => mockEditorInstance),
56+
constants: {
57+
INSERT_AS_TEXT: 'insert_as_text',
58+
},
5659
},
5760
}));
5861

phpmyfaq/assets/templates/default/index.twig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@
8484
<ul class="dropdown-menu dropdown-menu-end">
8585
{% if not isUserLoggedIn %}
8686
{% if isUserRegistrationEnabled %}
87-
<li><a class="dropdown-item" href="./user/register">{{ msgRegisterUser }}</a></li>
87+
<li><a class="dropdown-item" href="./user/register">{{ 'msgRegisterUser' | translate }}</a></li>
8888
{% endif %}
8989
<li><a class="dropdown-item" href="./login">{{ msgLoginUser }}</a></li>
9090
{% else %}
91-
<li><a class="dropdown-item" href="./user/ucp">{{ msgUserControlDropDown }}</a></li>
91+
<li><a class="dropdown-item" href="./user/ucp">{{ msgUserControlDropDown }}</a></li>run
9292
<li><a class="dropdown-item" href="./user/bookmarks">{{ msgBookmarks }}</a></li>
9393
<li>
9494
<a class="dropdown-item d-flex align-items-center" href="./user/chat">
@@ -98,10 +98,11 @@
9898
{% endif %}
9999
</a>
100100
</li>
101+
<li><a class="dropdown-item" href="./user/request-removal">{{ msgUserRemoval }}</a></li>
102+
<li><hr class="dropdown-divider"></li>
101103
{% if isUserHasAdminRights %}
102104
<li><a class="dropdown-item" href="./admin">{{ msgAdmin }}</a></li>
103105
{% endif %}
104-
<li><a class="dropdown-item" href="./user/request-removal">{{ msgUserRemoval }}</a></li>
105106
<li><hr class="dropdown-divider"></li>
106107
<li><a class="dropdown-item" href="./logout?csrf={{ csrfLogout }}">{{ msgLogoutUser }}</a></li>
107108
{% endif %}

phpmyfaq/src/phpMyFAQ/Controller/Frontend/AbstractFrontController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ protected function getHeader(Request $request): array
121121
'isUserRegistrationEnabled' => $this->configuration->get('security.enableRegistration'),
122122
'pluginStylesheets' => $this->configuration->getPluginManager()->getAllPluginStylesheets(),
123123
'pluginScripts' => $this->configuration->getPluginManager()->getAllPluginScripts(),
124-
'msgRegisterUser' => Translation::get(key: 'msgRegisterUser'),
125124
'msgFullName' => Translation::getString(key: 'ad_user_loggedin') . $this->currentUser->getLogin(),
126125
'msgLoginName' => $this->currentUser->getUserData('display_name'),
127126
'loginHeader' => Translation::get(key: 'msgLoginUser'),

phpmyfaq/src/phpMyFAQ/Controller/Frontend/WebAuthnController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
final class WebAuthnController extends AbstractFrontController
3030
{
3131
/**
32-
* @throws Exception|LoaderError
32+
* @throws Exception|LoaderError|\Exception
3333
*/
3434
#[Route(path: '/services/webauthn', name: 'public.webauthn.index', methods: ['GET'])]
3535
public function index(Request $request): Response
@@ -40,7 +40,6 @@ public function index(Request $request): Response
4040
'title' => Translation::get(key: 'msgLoginUser'),
4141
'faqHome' => $this->configuration->getDefaultUrl(),
4242
'isUserRegistrationEnabled' => $this->configuration->get(item: 'security.enableRegistration'),
43-
'msgRegisterUser' => Translation::get(key: 'msgRegisterUser'),
4443
]);
4544
}
4645
}

0 commit comments

Comments
 (0)