*/ class RoleCollectorServiceFactoryTest extends PHPUnit_Framework_TestCase { /** * @covers \BjyAuthorize\Service\RoleCollectorServiceFactory::createService */ public function testCreateService() { $factory = new RoleCollectorServiceFactory(); $serviceLocator = $this->getMock('Zend\\ServiceManager\\ServiceLocatorInterface'); $identityProvider = $this->getMock('BjyAuthorize\\Provider\\Identity\\ProviderInterface'); $serviceLocator ->expects($this->any()) ->method('get') ->with('BjyAuthorize\Provider\Identity\ProviderInterface') ->will($this->returnValue($identityProvider)); $collector = $factory->createService($serviceLocator); $this->assertInstanceOf('BjyAuthorize\\Collector\\RoleCollector', $collector); } }