Skip to content

Commit b799e14

Browse files
committed
Trivial clean up
Signed-off-by: Matt Friedman <maf675@gmail.com>
1 parent 47e26ea commit b799e14

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

event/listener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ public function __construct(config $config, controller_helper $controller_helper
8181
public static function getSubscribedEvents()
8282
{
8383
return [
84+
'core.page_header_after' => [['load_template_data'], ['pwa_manifest']],
8485
'core.ucp_display_module_before' => 'load_language',
8586
'core.acp_main_notice' => 'compatibility_notice',
86-
'core.page_header_after' => [['load_template_data'], ['pwa_manifest']],
8787
'core.acp_board_config_edit_add' => 'acp_pwa_options',
8888
'core.validate_config_variable' => 'validate_pwa_options',
8989
];
@@ -117,7 +117,7 @@ public function load_template_data()
117117
}
118118

119119
/**
120-
* Load language file
120+
* Load language file (this is required for the UCP)
121121
*/
122122
public function load_language()
123123
{

tests/event/listener_test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ public function test_construct()
145145
public function test_getSubscribedEvents()
146146
{
147147
self::assertEquals([
148+
'core.page_header_after',
148149
'core.ucp_display_module_before',
149150
'core.acp_main_notice',
150-
'core.page_header_after',
151151
'core.acp_board_config_edit_add',
152152
'core.validate_config_variable',
153153
], array_keys(\phpbb\webpushnotifications\event\listener::getSubscribedEvents()));
@@ -228,7 +228,7 @@ public function get_ucp_template_data_data()
228228
/**
229229
* @dataProvider get_ucp_template_data_data
230230
*/
231-
public function test_get_ucp_template_data($user_id, $method_data, $subscriptions, $expected)
231+
public function test_load_template_data($user_id, $method_data, $subscriptions, $expected)
232232
{
233233
$this->config['wpn_webpush_dropdown_subscribe'] = true;
234234
$this->user->data['user_id'] = $user_id;

0 commit comments

Comments
 (0)