public function testCreateService()
 {
     $sm = ServiceManagerFactory::getServiceManager();
     $factory = new TransportOptionsFactory();
     $options = $factory->createService($sm, 'goaliomailserviceoptions', 'GoalioMailServiceTest\\Mail\\Options\\TransportOptions');
     $this->assertInstanceOf('GoalioMailService\\Mail\\Options\\TransportOptions', $options);
 }
 public function testCreateService()
 {
     $sm = ServiceManagerFactory::getServiceManager();
     $factory = new MailPhpRendererFactory();
     $options = $factory->createService($sm, 'goaliomailservicerenderer');
     $this->assertInstanceOf('Zend\\View\\Renderer\\PhpRenderer', $options);
 }
 /**
  * @expectedException Exception
  */
 public function testServiceThrowsExceptionWhenTransportClassNotExists()
 {
     $sm = ServiceManagerFactory::getServiceManager();
     $options = $sm->get('goaliomailservice_options');
     $options->setTransportClass('DoesNotExist');
     $transport = $sm->get('goaliomailservice_transport');
 }
 public function testSetGetServiceManager()
 {
     $sm = ServiceManagerFactory::getServiceManager();
     $this->message->setServiceManager($sm);
     $this->assertEquals($sm, $this->message->getServiceManager());
 }