__invoke() public method

Create an object
public __invoke ( Interop\Container\ContainerInterface $container, string $requestedName, array $options = null ) : object
$container Interop\Container\ContainerInterface
$requestedName string
$options array
return object
 /**
  * @expectedException \AcMailer\Exception\InvalidArgumentException
  */
 public function testInvalidListenersThrowException()
 {
     $options = ['mail_listeners' => [new \stdClass(), 'invalid_service', '\\Nonsens\\Foo']];
     $this->initServiceLocator($options);
     $this->mailServiceFactory->__invoke($this->serviceLocator, 'acmailer.mailservice.default');
 }