Gc\Mvc\Listener\CacheListenerTest::testOnRouteWithoutCache PHP Method

testOnRouteWithoutCache() public method

Test
public testOnRouteWithoutCache ( ) : void
return void
    public function testOnRouteWithoutCache()
    {
        $config = Mockery::mock('Gc\\Core\\Config');
        $config->shouldReceive('getValue')->with('cache_is_active')->once()->andReturn(false);
        $serviceLocator = Mockery::mock('Zend\\Mvc\\MvcEvent');
        $serviceLocator->shouldReceive('get')->once()->with('CoreConfig')->andReturn($config);
        $application = Mockery::Mock('Zend\\Mvc\\Application');
        $application->shouldReceive('getServiceManager')->once()->andReturn($serviceLocator);
        $event = Mockery::mock('Zend\\Mvc\\MvcEvent');
        $event->shouldReceive('getApplication')->once()->andReturn($application);
        $event->shouldReceive('getRequest')->once()->andReturn(Mockery::mock('Zend\\Http\\PhpEnvironment\\Request'));
        $this->object->onRoute($event);
    }