Exemplo n.º 1
0
 public function testHandle()
 {
     $request = Request::create('http://localhost/test', 'GET', array(), array(), array(), array('PATH_INFO' => '/test'));
     $fileCache = new FileCacheModuleProvider($this->application);
     $fileCache->setCachePath(vfsStream::url('cacheDir'));
     $this->application[\Phruts\Util\Globals::MODULE_CONFIG_PROVIDER] = $fileCache;
     $response = $this->actionKernel->handle($request, HttpKernelInterface::MASTER_REQUEST, false);
     $this->assertEquals(200, $response->getStatusCode(), $response->getContent());
     //        $request = Request::create('http://localhost/admin/test', 'GET', array(), array(), array(), array('PATH_INFO' => '/admin/test'));
     //        RequestUtils::selectModule($request, $this->application);
     //        $response = $this->actionKernel->handle($request, HttpKernelInterface::MASTER_REQUEST, false);
     //        $this->assertEquals(200, $response->getStatusCode(), $response->getContent());
 }