コード例 #1
0
ファイル: BaseTest.php プロジェクト: utrenkner/YAWIK
 /**
  * @testdox Allows setting and getting a \Zend\Mail\Transport\TransportInterface
  */
 public function testSetAndGetTransport()
 {
     $target = new MailService();
     $transport = $this->getMockForAbstractClass('\\Zend\\Mail\\Transport\\TransportInterface');
     $target->setTransport($transport);
     $this->assertSame($transport, $target->getTransport());
 }
コード例 #2
0
ファイル: SendMailTest.php プロジェクト: cross-solution/yawik
 public function setup()
 {
     $test = $this;
     $sendCallback = function ($value) use($test) {
         return $value === $test->expectedMail;
     };
     $transport = $this->getMockForAbstractClass('\\Zend\\Mail\\Transport\\TransportInterface');
     $transport->expects($this->once())->method('send')->with($this->callback($sendCallback));
     $target = new MailService(new ServiceManager());
     $target->setTransport($transport);
     $this->target = $target;
 }