Loading tests/src/Unit/Integration/RulesAction/SystemEmailToUsersOfRoleTest.php +7 −2 Original line number Diff line number Diff line Loading @@ -149,10 +149,15 @@ class SystemEmailToUsersOfRoleTest extends RulesEntityIntegrationTestBase { $moderator = $this->prophesize(RoleInterface::class); $moderator->id()->willReturn('moderator'); // Use a language other than the site default. $language = $this->prophesize(LanguageInterface::class); $language->getId()->willReturn('da'); $roles = [$recipient->reveal(), $moderator->reveal()]; $this->action->setContextValue('roles', $roles) ->setContextValue('subject', 'subject') ->setContextValue('message', 'hello'); ->setContextValue('message', 'hello') ->setContextValue('language', $language->reveal()); $params = [ 'subject' => 'subject', Loading @@ -166,7 +171,7 @@ class SystemEmailToUsersOfRoleTest extends RulesEntityIntegrationTestBase { $this->mailManager->mail( 'rules', 'rules_action_mail_' . $this->action->getPluginId(), Argument::any(), LanguageInterface::LANGCODE_SITE_DEFAULT, $language->reveal()->getId(), $params, NULL ) Loading tests/src/Unit/Integration/RulesAction/SystemSendEmailTest.php +8 −2 Original line number Diff line number Diff line Loading @@ -98,9 +98,15 @@ class SystemSendEmailTest extends RulesIntegrationTestBase { */ public function testSendMailToTwoRecipients() { $to = ['mail@example.com', 'mail2@example.com']; // Use a language other than the site default. $language = $this->prophesize(LanguageInterface::class); $language->getId()->willReturn('da'); $this->action->setContextValue('to', $to) ->setContextValue('subject', 'subject') ->setContextValue('message', 'hello'); ->setContextValue('message', 'hello') ->setContextValue('language', $language->reveal()); $params = [ 'subject' => 'subject', Loading @@ -110,7 +116,7 @@ class SystemSendEmailTest extends RulesIntegrationTestBase { $this->mailManager->mail( 'rules', 'rules_action_mail_' . $this->action->getPluginId(), implode(', ', $to), LanguageInterface::LANGCODE_SITE_DEFAULT, $language->reveal()->getId(), $params, NULL ) Loading Loading
tests/src/Unit/Integration/RulesAction/SystemEmailToUsersOfRoleTest.php +7 −2 Original line number Diff line number Diff line Loading @@ -149,10 +149,15 @@ class SystemEmailToUsersOfRoleTest extends RulesEntityIntegrationTestBase { $moderator = $this->prophesize(RoleInterface::class); $moderator->id()->willReturn('moderator'); // Use a language other than the site default. $language = $this->prophesize(LanguageInterface::class); $language->getId()->willReturn('da'); $roles = [$recipient->reveal(), $moderator->reveal()]; $this->action->setContextValue('roles', $roles) ->setContextValue('subject', 'subject') ->setContextValue('message', 'hello'); ->setContextValue('message', 'hello') ->setContextValue('language', $language->reveal()); $params = [ 'subject' => 'subject', Loading @@ -166,7 +171,7 @@ class SystemEmailToUsersOfRoleTest extends RulesEntityIntegrationTestBase { $this->mailManager->mail( 'rules', 'rules_action_mail_' . $this->action->getPluginId(), Argument::any(), LanguageInterface::LANGCODE_SITE_DEFAULT, $language->reveal()->getId(), $params, NULL ) Loading
tests/src/Unit/Integration/RulesAction/SystemSendEmailTest.php +8 −2 Original line number Diff line number Diff line Loading @@ -98,9 +98,15 @@ class SystemSendEmailTest extends RulesIntegrationTestBase { */ public function testSendMailToTwoRecipients() { $to = ['mail@example.com', 'mail2@example.com']; // Use a language other than the site default. $language = $this->prophesize(LanguageInterface::class); $language->getId()->willReturn('da'); $this->action->setContextValue('to', $to) ->setContextValue('subject', 'subject') ->setContextValue('message', 'hello'); ->setContextValue('message', 'hello') ->setContextValue('language', $language->reveal()); $params = [ 'subject' => 'subject', Loading @@ -110,7 +116,7 @@ class SystemSendEmailTest extends RulesIntegrationTestBase { $this->mailManager->mail( 'rules', 'rules_action_mail_' . $this->action->getPluginId(), implode(', ', $to), LanguageInterface::LANGCODE_SITE_DEFAULT, $language->reveal()->getId(), $params, NULL ) Loading