public function testCreateServiceWithUnregisterExtension()
 {
     $moduleOptions = new ModuleOptions();
     $moduleOptions->setRegisteredExtensions(array('foo' => false));
     $mockExtension = \Mockery::mock('LdcUserProfile\\Extensions\\AbstractExtension');
     $mockExtension->shouldReceive('getName')->andReturn('foo');
     $serviceManager = new \Zend\ServiceManager\ServiceManager();
     $serviceManager->setService('ldc-user-profile_module_options', $moduleOptions);
     //$serviceManager->setService('foo', $mockExtension);
     $factory = new \LdcUserProfile\Service\ProfileServiceFactory();
     $svc = $factory->createService($serviceManager);
     $this->assertInstanceOf('LdcUserProfile\\Service\\ProfileService', $svc);
     $this->assertFalse($svc->hasExtension('foo'));
     $this->assertFalse($svc->hasExtension($mockExtension));
 }
 public function testSetRegisteredExtensionsRequiresArray()
 {
     $this->setExpectedException('PHPUnit_Framework_Error');
     $this->options->setRegisteredExtensions('foo');
 }