diff options
author | stevendegroote <stevendegroote@gmail.com> | 2019-09-17 23:15:54 +0200 |
---|---|---|
committer | stevendegroote <stevendegroote@gmail.com> | 2019-09-17 23:15:54 +0200 |
commit | f8967fec78d826ea8d9ca34f65966ff8a7674b47 (patch) | |
tree | f9c5f408e7764ec6343e084e7fc6d62d07e3400f /tests/notification | |
parent | ce93b224107a65b43253c36812b636321eb55a78 (diff) | |
parent | 4db585a4cb2e5359074a82ef088574609155294b (diff) | |
download | forums-f8967fec78d826ea8d9ca34f65966ff8a7674b47.tar forums-f8967fec78d826ea8d9ca34f65966ff8a7674b47.tar.gz forums-f8967fec78d826ea8d9ca34f65966ff8a7674b47.tar.bz2 forums-f8967fec78d826ea8d9ca34f65966ff8a7674b47.tar.xz forums-f8967fec78d826ea8d9ca34f65966ff8a7674b47.zip |
Merge branch '3.2.x' into ticket/16159
Diffstat (limited to 'tests/notification')
8 files changed, 28 insertions, 3 deletions
diff --git a/tests/notification/base.php b/tests/notification/base.php index b64e25cf8c..80b9a0d777 100644 --- a/tests/notification/base.php +++ b/tests/notification/base.php @@ -163,7 +163,7 @@ abstract class phpbb_tests_notification_base extends phpbb_database_test_case 'order_dir' => 'ASC', ), $options)); - $this->assertEquals(sizeof($expected), $notifications['unread_count']); + $this->assertEquals(count($expected), $notifications['unread_count']); $i = 0; foreach ($notifications['notifications'] as $notification) diff --git a/tests/notification/fixtures/submit_post_notification.type.bookmark.xml b/tests/notification/fixtures/submit_post_notification.type.bookmark.xml index 7f069abc59..db1cef2ef6 100644 --- a/tests/notification/fixtures/submit_post_notification.type.bookmark.xml +++ b/tests/notification/fixtures/submit_post_notification.type.bookmark.xml @@ -29,6 +29,7 @@ </row> </table> <table name="phpbb_notifications"> + <column>notification_id</column> <column>notification_type_id</column> <column>user_id</column> <column>item_id</column> @@ -37,6 +38,7 @@ <column>notification_data</column> <row> <value>1</value> + <value>1</value> <value>5</value> <value>1</value> <value>1</value> diff --git a/tests/notification/fixtures/submit_post_notification.type.post.xml b/tests/notification/fixtures/submit_post_notification.type.post.xml index a4bf9d3ee4..920b271525 100644 --- a/tests/notification/fixtures/submit_post_notification.type.post.xml +++ b/tests/notification/fixtures/submit_post_notification.type.post.xml @@ -21,6 +21,7 @@ </row> </table> <table name="phpbb_notifications"> + <column>notification_id</column> <column>notification_type_id</column> <column>user_id</column> <column>item_id</column> @@ -29,6 +30,7 @@ <column>notification_data</column> <row> <value>1</value> + <value>1</value> <value>5</value> <value>1</value> <value>1</value> @@ -36,6 +38,7 @@ <value></value> </row> <row> + <value>2</value> <value>1</value> <value>8</value> <value>1</value> diff --git a/tests/notification/fixtures/submit_post_notification.type.post_in_queue.xml b/tests/notification/fixtures/submit_post_notification.type.post_in_queue.xml index 0a955c48d2..12e73b0ff2 100644 --- a/tests/notification/fixtures/submit_post_notification.type.post_in_queue.xml +++ b/tests/notification/fixtures/submit_post_notification.type.post_in_queue.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <dataset> <table name="phpbb_notifications"> + <column>notification_id</column> <column>notification_type_id</column> <column>user_id</column> <column>item_id</column> @@ -9,6 +10,7 @@ <column>notification_data</column> <row> <value>1</value> + <value>1</value> <value>6</value> <value>1</value> <value>1</value> diff --git a/tests/notification/fixtures/submit_post_notification.type.quote.xml b/tests/notification/fixtures/submit_post_notification.type.quote.xml index c66830fbf5..9f4ba91475 100644 --- a/tests/notification/fixtures/submit_post_notification.type.quote.xml +++ b/tests/notification/fixtures/submit_post_notification.type.quote.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <dataset> <table name="phpbb_notifications"> + <column>notification_id</column> <column>notification_type_id</column> <column>user_id</column> <column>item_id</column> @@ -9,6 +10,7 @@ <column>notification_data</column> <row> <value>1</value> + <value>1</value> <value>5</value> <value>1</value> <value>1</value> diff --git a/tests/notification/fixtures/submit_post_notification.type.topic.xml b/tests/notification/fixtures/submit_post_notification.type.topic.xml index e0f6583f48..1f96ed2ee7 100644 --- a/tests/notification/fixtures/submit_post_notification.type.topic.xml +++ b/tests/notification/fixtures/submit_post_notification.type.topic.xml @@ -21,6 +21,7 @@ </row> </table> <table name="phpbb_notifications"> + <column>notification_id</column> <column>notification_type_id</column> <column>user_id</column> <column>item_id</column> @@ -29,6 +30,7 @@ <column>notification_data</column> <row> <value>1</value> + <value>1</value> <value>8</value> <value>1</value> <value>1</value> diff --git a/tests/notification/group_request_test.php b/tests/notification/group_request_test.php index 92e758a336..e849c66fa5 100644 --- a/tests/notification/group_request_test.php +++ b/tests/notification/group_request_test.php @@ -49,9 +49,23 @@ class phpbb_notification_group_request_test extends phpbb_tests_notification_bas $this->cache->get_driver() )); $this->container->set('group_helper', new \phpbb\group\helper( + $this->getMock('\phpbb\auth\auth'), + $this->cache, + $this->config, new \phpbb\language\language( new phpbb\language\language_file_loader($phpbb_root_path, $phpEx) - ) + ), + new phpbb_mock_event_dispatcher(), + new \phpbb\path_helper( + new \phpbb\symfony_request( + new phpbb_mock_request() + ), + new \phpbb\filesystem\filesystem(), + $this->getMock('\phpbb\request\request'), + $phpbb_root_path, + $phpEx + ), + $this->user )); $phpbb_dispatcher = new phpbb_mock_event_dispatcher; $phpbb_log = new \phpbb\log\dummy(); diff --git a/tests/notification/notification_test.php b/tests/notification/notification_test.php index ec42aa193c..6bbabfc602 100644 --- a/tests/notification/notification_test.php +++ b/tests/notification/notification_test.php @@ -108,7 +108,7 @@ class phpbb_notification_test extends phpbb_tests_notification_base $types = array('notification.type.quote', 'notification.type.bookmark', 'notification.type.post', 'test'); foreach ($types as $id => $type) { - $this->db->sql_query('INSERT INTO phpbb_notification_types ' . + $this->getConnection()->createQueryTable('insertNotification', 'INSERT INTO phpbb_notification_types ' . $this->db->sql_build_array('INSERT', array( 'notification_type_id' => ($id + 1), 'notification_type_name' => $type, |