mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 15:43:51 +00:00
Fix new CS
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Notification\Email;
|
||||
|
||||
use Chill\MainBundle\Entity\Notification;
|
||||
@@ -16,6 +25,10 @@ use Symfony\Component\Mailer\MailerInterface;
|
||||
use Symfony\Component\Mime\Email;
|
||||
use Symfony\Component\Translation\Translator;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
class NotificationMailerTest extends TestCase
|
||||
{
|
||||
use ProphecyTrait;
|
||||
@@ -35,7 +48,7 @@ class NotificationMailerTest extends TestCase
|
||||
->setSender($user1)
|
||||
->addAddressee($user2)
|
||||
->addAddressee($user3)
|
||||
;
|
||||
;
|
||||
|
||||
$comment = (new NotificationComment())
|
||||
->setContent("foo bar baz")
|
||||
@@ -47,14 +60,14 @@ class NotificationMailerTest extends TestCase
|
||||
|
||||
// a mail only to user1 and user3 should have been sent
|
||||
$mailer->send(Argument::that(function (Email $email) {
|
||||
foreach ($email->getTo() as $address) {
|
||||
if ($address->getAddress() === 'user1@foo.com' || $address->getAddress() === 'user3@foo.com') {
|
||||
return true;
|
||||
}
|
||||
foreach ($email->getTo() as $address) {
|
||||
if ($address->getAddress() === 'user1@foo.com' || $address->getAddress() === 'user3@foo.com') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}));
|
||||
return false;
|
||||
}));
|
||||
|
||||
$objectManager = $this->prophesize(EntityManagerInterface::class);
|
||||
|
||||
@@ -104,8 +117,7 @@ class NotificationMailerTest extends TestCase
|
||||
|
||||
private function buildNotificationMailer(
|
||||
MailerInterface $mailer = null,
|
||||
): NotificationMailer
|
||||
{
|
||||
): NotificationMailer {
|
||||
return new NotificationMailer(
|
||||
$mailer,
|
||||
new NullLogger(),
|
||||
|
Reference in New Issue
Block a user