public function test_mailer_should_mail() { $this->_helper->injectConfigValues(array('mailer' => array('template' => null, 'attachments' => null))); $targetPath = GARP_APPLICATION_PATH . '/../tests/tmp'; $mailer = new Garp_Mailer(); $mailer->setTransport(new Zend_Mail_Transport_File(array('path' => $targetPath, 'callback' => function () { return 'mail.txt'; }))); $mailer->send($this->_getParams()); $this->assertTrue(file_exists($targetPath . '/mail.txt')); /** * Note: verifying the contents of the file would be testing Zend_Mail_Transport_File. * Let's for now assume if the file is there, the content is correct. */ unlink($targetPath . '/mail.txt'); }