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