public function testTransportUsesPostageService() { $service = $this->getMock('EzMail\\Service\\PostageService', array(), array('my-secret-key')); $transport = new HttpTransport($service); $message = new Message(); $service->expects($this->once())->method('send')->with($this->equalTo($message)); $transport->send($message); }
public function testTransportUsesSesService() { $client = $this->getMock('Aws\\Ses\\SesClient', array(), array(), '', false); $service = $this->getMock('EzMail\\Service\\SesService', array(), array($client)); $transport = new HttpTransport($service); $message = new Message(); $service->expects($this->once())->method('send')->with($this->equalTo($message)); $transport->send($message); }