aboutsummaryrefslogtreecommitdiffstats
path: root/tests/notification/submit_post_type_quote_test.php
diff options
context:
space:
mode:
authorMaat <maat-pub@mageia.biz>2020-05-08 21:52:11 +0200
committerMaat <maat-pub@mageia.biz>2020-05-08 21:52:11 +0200
commit8ea437e30605e0f66b5220bf904a61d7c1d11ddd (patch)
treee0db2bb4a012d5b06a633160b19f62f4868ecd28 /tests/notification/submit_post_type_quote_test.php
parent36bc1870f21fac04736a1049c1d5b8e127d729f4 (diff)
parent2fdd46b36431ae0f58bb2e78e42553168db9a0ff (diff)
downloadforums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar
forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.gz
forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.bz2
forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.xz
forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.zip
Merge remote-tracking branch 'upstream/prep-release-3.2.9'
Diffstat (limited to 'tests/notification/submit_post_type_quote_test.php')
-rw-r--r--tests/notification/submit_post_type_quote_test.php39
1 files changed, 21 insertions, 18 deletions
diff --git a/tests/notification/submit_post_type_quote_test.php b/tests/notification/submit_post_type_quote_test.php
index 61e3840773..3fab8c05ba 100644
--- a/tests/notification/submit_post_type_quote_test.php
+++ b/tests/notification/submit_post_type_quote_test.php
@@ -51,6 +51,9 @@ class phpbb_notification_submit_post_type_quote_test extends phpbb_notification_
*/
public function submit_post_data()
{
+ // The new mock container is needed because the data providers may be executed before phpunit call setUp()
+ $parser = $this->get_test_case_helpers()->set_s9e_services(new phpbb_mock_container_builder())->get('text_formatter.parser');
+
return array(
/**
* Normal post
@@ -65,15 +68,15 @@ class phpbb_notification_submit_post_type_quote_test extends phpbb_notification_
*/
array(
array(
- 'message' => implode(' ', array(
- '[quote=&quot;poster&quot;:uid]poster should not be notified[/quote:uid]',
- '[quote=&quot;test&quot;:uid]test should be notified[/quote:uid]',
- '[quote=&quot;unauthorized&quot;:uid]unauthorized to read, should not receive a notification[/quote:uid]',
- '[quote=&quot;notified&quot;:uid]already notified, should not receive a new notification[/quote:uid]',
- '[quote=&quot;disabled&quot;:uid]option disabled, should not receive a notification[/quote:uid]',
- '[quote=&quot;default&quot;:uid]option set to default, should receive a notification[/quote:uid]',
- '[quote=&quot;doesn\'t exist&quot;:uid]user does not exist, should not receive a notification[/quote:uid]',
- )),
+ 'message' => $parser->parse(implode(' ', array(
+ '[quote="poster"]poster should not be notified[/quote]',
+ '[quote="test"]test should be notified[/quote]',
+ '[quote="unauthorized"]unauthorized to read, should not receive a notification[/quote]',
+ '[quote="notified"]already notified, should not receive a new notification[/quote]',
+ '[quote="disabled"]option disabled, should not receive a notification[/quote]',
+ '[quote="default"]option set to default, should receive a notification[/quote]',
+ '[quote="doesn\'t exist"]user does not exist, should not receive a notification[/quote]',
+ ))),
'bbcode_uid' => 'uid',
),
array(
@@ -94,15 +97,15 @@ class phpbb_notification_submit_post_type_quote_test extends phpbb_notification_
*/
array(
array(
- 'message' => implode(' ', array(
- '[quote=&quot;poster&quot;:uid]poster should not be notified[/quote:uid]',
- '[quote=&quot;test&quot;:uid]test should be notified[/quote:uid]',
- '[quote=&quot;unauthorized&quot;:uid]unauthorized to read, should not receive a notification[/quote:uid]',
- '[quote=&quot;notified&quot;:uid]already notified, should not receive a new notification[/quote:uid]',
- '[quote=&quot;disabled&quot;:uid]option disabled, should not receive a notification[/quote:uid]',
- '[quote=&quot;default&quot;:uid]option set to default, should receive a notification[/quote:uid]',
- '[quote=&quot;doesn\'t exist&quot;:uid]user does not exist, should not receive a notification[/quote:uid]',
- )),
+ 'message' => $parser->parse(implode(' ', array(
+ '[quote="poster"]poster should not be notified[/quote]',
+ '[quote="test"]test should be notified[/quote]',
+ '[quote="unauthorized"]unauthorized to read, should not receive a notification[/quote]',
+ '[quote="notified"]already notified, should not receive a new notification[/quote]',
+ '[quote="disabled"]option disabled, should not receive a notification[/quote]',
+ '[quote="default"]option set to default, should receive a notification[/quote]',
+ '[quote="doesn\'t exist"]user does not exist, should not receive a notification[/quote]',
+ ))),
'bbcode_uid' => 'uid',
'force_approved_state' => false,
),