Example #1
0
 public function testGetEmptyOutput()
 {
     $state = new HttpResponse();
     $t = $state->getOutput();
     $this->assertEquals($t, '');
 }
Example #2
0
 /**
  *
  * @see ProcessorI::delegateRequest()
  * @param HttpRequestA $oHttpRequest
  * @param ProcessorA $oNewProcessor
  * @param HttpResponseA $oResponse
  * @returns ModelA
  */
 public function delegateRequest(HttpRequestA $oHttpRequest, ProcessorA $oNewProcessor, HttpResponseA $oResponse = null)
 {
     $oDispatcher = vsc::getEnv()->getDispatcher();
     /** @var ProcessorMap $oMap */
     $oMap = $oDispatcher->getSiteMap()->findProcessorMap($oNewProcessor);
     if (MappingA::isValid($oMap)) {
         $oNewProcessor->setMap($oMap);
         $oNewProcessor->init();
         /* @var RwDispatcher $oDispatcher */
         $oMap->merge($this->getMap());
         if (HttpResponse::isValid($oResponse)) {
             $oMap->setResponse($oResponse);
         }
         $this->setMap($oMap);
     }
     $oNewProcessor->setLocalVars($this->getLocalVars(), true);
     return $oNewProcessor->handleRequest($oHttpRequest);
 }