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

testOnFinishWithCacheDisabled() public method

Test
    public function testOnFinishWithCacheDisabled()
    {
        $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);
        $this->object->onFinish($event);
    }