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