コード例 #1
0
 public function testSetFileOptions()
 {
     $expected = new FileOptions();
     $this->assertSame($this->mailOptions, $this->mailOptions->setFileOptions($expected));
     $this->assertSame($expected, $this->mailOptions->getFileOptions());
     $this->mailOptions->setFileOptions([]);
     $this->assertInstanceOf('Zend\\Mail\\Transport\\FileOptions', $this->mailOptions->getFileOptions());
 }
コード例 #2
0
 /**
  * @param TransportInterface $transport
  * @return TransportInterface
  */
 protected function setupTransportConfig(TransportInterface $transport)
 {
     if ($transport instanceof Smtp) {
         $transport->setOptions($this->mailOptions->getSmtpOptions());
     } elseif ($transport instanceof File) {
         $transport->setOptions($this->mailOptions->getFileOptions());
     }
     return $transport;
 }