Skip to content

Commit 91ad46b

Browse files
committed
Fix tests
1 parent 9909487 commit 91ad46b

2 files changed

Lines changed: 8 additions & 23 deletions

File tree

tests/event/listener_test.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -123,29 +123,6 @@ protected function setUp(): void
123123
$this->root_path = $phpbb_root_path;
124124
}
125125

126-
/**
127-
* Remove entries from subscriptions table to avoid conflicts with other tests
128-
* that have fixtures with the same table name
129-
*
130-
* @return void
131-
*/
132-
protected function tearDown(): void
133-
{
134-
$sql_layer = $this->db->get_sql_layer();
135-
$query = ($sql_layer === 'sqlite3')
136-
? 'DELETE FROM phpbb_wpn_push_subscriptions'
137-
: 'TRUNCATE TABLE phpbb_wpn_push_subscriptions';
138-
139-
$this->db->sql_query($query);
140-
141-
if ($sql_layer === 'postgres')
142-
{
143-
$this->db->sql_query('ALTER SEQUENCE phpbb_wpn_push_subscriptions_seq RESTART WITH 1');
144-
}
145-
146-
parent::tearDown();
147-
}
148-
149126
protected function set_listener()
150127
{
151128
$this->listener = new \phpbb\webpushnotifications\event\listener(

tests/notification/fixtures/webpush.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<dataset>
3+
<table name="phpbb_wpn_push_subscriptions">
4+
<column>subscription_id</column>
5+
<column>user_id</column>
6+
<column>endpoint</column>
7+
<column>p256dh</column>
8+
<column>auth</column>
9+
<column>expiration_time</column>
10+
</table>
311
<table name="phpbb_wpn_notification_push">
412
<column>item_id</column>
513
<column>push_data</column>

0 commit comments

Comments
 (0)