*/ class ConfigResourceProviderServiceFactoryTest extends PHPUnit_Framework_TestCase { /** * @covers \BjyAuthorize\Service\ConfigResourceProviderServiceFactory::createService */ public function testCreateService() { $factory = new ConfigResourceProviderServiceFactory(); $serviceLocator = $this->getMock('Zend\\ServiceManager\\ServiceLocatorInterface'); $config = array( 'resource_providers' => array( 'BjyAuthorize\Provider\Resource\Config' => array(), ), ); $serviceLocator ->expects($this->any()) ->method('get') ->with('BjyAuthorize\Config') ->will($this->returnValue($config)); $guard = $factory->createService($serviceLocator); $this->assertInstanceOf('BjyAuthorize\\Provider\\Resource\\Config', $guard); } }