Eva\EvaEngine\EvaEngineTest\Interceptor\DispatchTest::testTextCacheDisabledByUri PHP Method

testTextCacheDisabledByUri() public method

    public function testTextCacheDisabledByUri()
    {
        $_SERVER['HTTP_HOST'] = 'example.com';
        $_SERVER['REQUEST_METHOD'] = 'GET';
        $_SERVER['REQUEST_URI'] = '/path?foo=aaa&bar=bbb&_eva_refresh_dispatch_cache=1';
        $_GET = array('_url' => '/path', 'foo' => 'aaa', 'bar' => 'bbb', '_eva_refresh_dispatch_cache' => 1);
        $request = new Request();
        $this->di->set('request', $request);
        $this->di->getViewCache()->flush();
        $interceptor = new DispatchInterceptor();
        /**
         * @var Dispatcher $dispatcher
        */
        $dispatcher = $this->di->getDispatcher();
        $dispatcher->setParams(array('_dispatch_cache' => 'lifetime=100'));
        $this->assertEquals(true, $interceptor->injectInterceptor($dispatcher));
        $this->assertEquals($interceptor->getCacheBodyKey(), 'd6bd338ec8eb8666f3d054566f335039_b');
        //var_dump($this->di->getDispatcher()->getParams());
    }