File tree Expand file tree Collapse file tree 2 files changed +69
-0
lines changed Expand file tree Collapse file tree 2 files changed +69
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /*
4+ * This file is part of the Symfony package.
5+ *
6+ * (c) Fabien Potencier <fabien@symfony.com>
7+ *
8+ * For the full copyright and license information, please view the LICENSE
9+ * file that was distributed with this source code.
10+ */
11+
12+ namespace Symfony \Component \Notifier \Tests \Fixtures ;
13+
14+ use Symfony \Component \Notifier \Message \MessageInterface ;
15+ use Symfony \Component \Notifier \Message \MessageOptionsInterface ;
16+
17+ final class TestOptions implements MessageOptionsInterface
18+ {
19+ private $ options ;
20+
21+ public function __construct (array $ options = [])
22+ {
23+ $ this ->options = $ options ;
24+ }
25+
26+ public function getRecipientId (): ?string
27+ {
28+ return $ this ->options ['recipient_id ' ];
29+ }
30+
31+ public function toArray (): array
32+ {
33+ return $ this ->options ;
34+ }
35+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /*
4+ * This file is part of the Symfony package.
5+ *
6+ * (c) Fabien Potencier <fabien@symfony.com>
7+ *
8+ * For the full copyright and license information, please view the LICENSE
9+ * file that was distributed with this source code.
10+ */
11+
12+ namespace Symfony \Component \Notifier \Tests \Mailer ;
13+
14+ use Symfony \Component \Mailer \Envelope ;
15+ use Symfony \Component \Mailer \MailerInterface ;
16+ use Symfony \Component \Mime \RawMessage ;
17+
18+ /**
19+ * @author Oskar Stark <oskarstark@googlemail.com>
20+ */
21+ class DummyMailer implements MailerInterface
22+ {
23+ private $ sentMessage = null ;
24+
25+ public function send (RawMessage $ message , Envelope $ envelope = null ): void
26+ {
27+ $ this ->sentMessage = $ message ;
28+ }
29+
30+ public function getSentEmail (): RawMessage
31+ {
32+ return $ this ->sentMessage ;
33+ }
34+ }
You can’t perform that action at this time.
0 commit comments