コード例 #1
0
ファイル: MailTest.php プロジェクト: hjr3/zf2
 public function testInitializationInitializesMailObject()
 {
     $resource = new Zend_Application_Resource_Mail(array());
     $resource->setBootstrap($this->bootstrap);
     $resource->setOptions(array('transport' => array('type' => 'sendmail')));
     $resource->init();
     $this->assertTrue($resource->getMail() instanceof Zend_Mail_Transport_Abstract);
     $this->assertTrue($resource->getMail() instanceof Zend_Mail_Transport_Sendmail);
 }
コード例 #2
0
ファイル: MailTest.php プロジェクト: omusico/logica
 /**
  * @group ZF-11022
  */
 public function testOptionRegisterIsUnset()
 {
     $options = array('transport' => array('register' => 1, 'type' => 'Zend_Mail_Transport_Sendmail'));
     $resource = new Zend_Application_Resource_Mail(array());
     $resource->setBootstrap($this->bootstrap);
     $resource->setOptions($options);
     $this->assertEmpty($resource->getMail()->parameters);
 }