Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iMattPro committed Dec 20, 2024
1 parent 99e5361 commit 1a4cef1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/event/listener_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ public function test_pwa_manifest()
$this->template->expects(self::once())
->method('assign_vars')
->with([
'U_MANIFEST_URL' => $this->controller_helper->route('phpbb_webpushnotifications_manifest_controller'),
'U_MANIFEST_URL' => 'ext/phpbb/webpushnotifications/manifest.' . $this->php_ext,
'U_TOUCH_ICON' => ext::PWA_ICON_DIR . '/icon-192x192.png',
'SHORT_SITE_NAME' => 'Test',
]);
Expand Down
8 changes: 5 additions & 3 deletions tests/functional/functional_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,16 @@ public function test_dropdown_subscribe_button()

public function test_manifest()
{
$board_url = generate_board_url();

$expected = [
'name' => 'yourdomain.com',
'short_name' => 'yourdomain',
'display' => 'standalone',
'orientation' => 'portrait',
'dir' => 'ltr',
'start_url' => '/',
'scope' => '/',
'start_url' => $board_url,
'scope' => $board_url . '/',
];

$this->login();
Expand All @@ -137,7 +139,7 @@ public function test_manifest()
$crawler = self::submit($form);
$this->assertStringContainsString($this->lang('CONFIG_UPDATED'), $crawler->filter('.successbox')->text());

self::request('GET', 'app.php/manifest', [], false);
self::request('GET', 'ext/phpbb/webpushnotifications/manifest.php', [], false);
$this->assertEquals(json_encode($expected), self::get_content());
}

Expand Down

0 comments on commit 1a4cef1

Please sign in to comment.