AcMailer\Controller\Plugin\SendMailPlugin::setMailService PHP Method

setMailService() public method

public setMailService ( AcMailer\Service\MailServiceInterface $mailService )
$mailService AcMailer\Service\MailServiceInterface
    public function setMailService(MailServiceInterface $mailService)
    {
        $this->mailService = $mailService;
        return $this;
    }

Usage Example

Exemplo n.º 1
0
 public function testMailServiceAwareness()
 {
     $this->assertSame($this->service, $this->plugin->getMailService());
     $anotherService = new MailServiceMock();
     $this->assertSame($this->plugin, $this->plugin->setMailService($anotherService));
     $this->assertSame($anotherService, $this->plugin->getMailService());
 }