public function testCreateServiceWithName() { $pm = $this->createControllerManager(); $mailServiceName = sprintf('%s.%s.%s', MailServiceAbstractFactory::ACMAILER_PART, MailServiceAbstractFactory::SPECIFIC_PART, 'concrete'); $pm->getServiceLocator()->setService($mailServiceName, new MailServiceMock()); $this->assertInstanceOf('AcMailer\\Controller\\Plugin\\SendMailPlugin', $this->factory->createServiceWithName($pm, '', 'sendMailConcrete')); }
public function testCreateServiceWithName() { $sm = $this->createServiceManager(); $mailServiceName = sprintf('%s.%s.%s', MailServiceAbstractFactory::ACMAILER_PART, MailServiceAbstractFactory::SPECIFIC_PART, 'concrete'); $sm->setService($mailServiceName, new MailServiceMock()); $this->assertInstanceOf(SendMailPlugin::class, $this->factory->__invoke($sm, 'sendMailConcrete')); }