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