aboutsummaryrefslogtreecommitdiffstats
path: root/tests/notification/submit_post_type_quote_test.php
diff options
context:
space:
mode:
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="poster":uid]poster should not be notified[/quote:uid]',
- '[quote="test":uid]test should be notified[/quote:uid]',
- '[quote="unauthorized":uid]unauthorized to read, should not receive a notification[/quote:uid]',
- '[quote="notified":uid]already notified, should not receive a new notification[/quote:uid]',
- '[quote="disabled":uid]option disabled, should not receive a notification[/quote:uid]',
- '[quote="default":uid]option set to default, should receive a notification[/quote:uid]',
- '[quote="doesn\'t exist":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="poster":uid]poster should not be notified[/quote:uid]',
- '[quote="test":uid]test should be notified[/quote:uid]',
- '[quote="unauthorized":uid]unauthorized to read, should not receive a notification[/quote:uid]',
- '[quote="notified":uid]already notified, should not receive a new notification[/quote:uid]',
- '[quote="disabled":uid]option disabled, should not receive a notification[/quote:uid]',
- '[quote="default":uid]option set to default, should receive a notification[/quote:uid]',
- '[quote="doesn\'t exist":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,
),