| 1 | <?php |
||
| 14 | class MailEventTest extends TestCase |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var MailEvent |
||
| 18 | */ |
||
| 19 | private $mailEvent; |
||
| 20 | |||
| 21 | public function testMailServiceInjection() |
||
| 22 | { |
||
| 23 | $mailService = new MailServiceMock(); |
||
| 24 | $this->mailEvent = new MailEvent($mailService); |
||
| 25 | $this->assertSame($mailService, $this->mailEvent->getMailService()); |
||
| 26 | |||
| 27 | $mailService2 = new MailServiceMock(); |
||
| 28 | $this->mailEvent->setMailService($mailService2); |
||
| 29 | $this->assertNotSame($mailService, $this->mailEvent->getMailService()); |
||
| 30 | $this->assertSame($mailService2, $this->mailEvent->getMailService()); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function testMailResultInjection() |
||
| 40 | } |
||
| 41 |