Changeset 1435
- Timestamp:
- 03/18/08 17:21:26 (4 months ago)
- Files:
-
- trunk/src/main/php/net/stubbles/service/jsonrpc/stubJsonRpcProcessor.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/websites/processors/stubAbstractPageProcessor.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/websites/processors/stubAbstractProcessor.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/websites/processors/stubProcessor.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/websites/stubFrontController.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/service/jsonrpc/stubJsonRpcProcessorTestCase.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/websites/stubFrontControllerTestCase.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/service/jsonrpc/stubJsonRpcProcessor.php
r1434 r1435 50 50 * 51 51 * This method only dispatches the request to different subprocessors. 52 *53 * @return stubAbstractProcessor54 52 */ 55 53 public function process() … … 63 61 $subProcessor = new $nqClassName(); 64 62 $subProcessor->process($this->request, $this->session, $this->response, $this->loadClassMap()); 65 return $this;66 63 } 67 64 trunk/src/main/php/net/stubbles/websites/processors/stubAbstractPageProcessor.php
r1256 r1435 27 27 /** 28 28 * processes the request 29 *30 * @return stubProcessor31 29 */ 32 30 public function process() … … 43 41 44 42 $this->doProcess($page, $pageName); 45 return $this;46 43 } 47 44 trunk/src/main/php/net/stubbles/websites/processors/stubAbstractProcessor.php
r1248 r1435 108 108 return $this->ssl; 109 109 } 110 111 /**112 * returns the created response113 *114 * @return stubResponse115 */116 public function getResponse()117 {118 return $this->response;119 }120 110 } 121 111 ?> trunk/src/main/php/net/stubbles/websites/processors/stubProcessor.php
r1247 r1435 53 53 /** 54 54 * processes the request 55 *56 * @return stubProcessor57 55 */ 58 56 public function process(); 59 60 /**61 * returns the created response62 *63 * @return stubResponse64 */65 public function getResponse();66 57 } 67 58 ?> trunk/src/main/php/net/stubbles/websites/stubFrontController.php
r1408 r1435 135 135 } 136 136 137 $ this->response = $processor->process()->getResponse();137 $processor->process(); 138 138 if ($this->request->isCancelled() === false) { 139 139 foreach ($interceptorInitializer->getPostInterceptors() as $postInterceptor) { trunk/src/test/php/net/stubbles/service/jsonrpc/stubJsonRpcProcessorTestCase.php
r1361 r1435 117 117 $jsonRpcProcessor->expects($this->once())->method('getSubProcessorClassName')->will($this->returnValue($subProcessorClass)); 118 118 $jsonRpcProcessor->expects($this->once())->method('loadClassMap')->will($this->returnValue(array())); 119 $ this->assertSame($jsonRpcProcessor, $jsonRpcProcessor->process());119 $jsonRpcProcessor->process(); 120 120 } 121 121 trunk/src/test/php/net/stubbles/websites/stubFrontControllerTestCase.php
r1408 r1435 187 187 ->method('getPostInterceptors'); 188 188 $this->mockRequest->expects($this->once())->method('isCancelled')->will($this->returnValue(true)); 189 $this->mockProcessor->expects($this->any()) 190 ->method('process') 191 ->will($this->returnValue($this->mockProcessor)); 192 $this->mockResponse2 = $this->getMock('stubResponse'); 193 $this->mockResponse2->expects($this->once())->method('send'); 194 $this->mockProcessor->expects($this->once()) 195 ->method('getResponse') 196 ->will($this->returnValue($this->mockResponse2)); 189 $this->mockProcessor->expects($this->any())->method('process'); 190 $this->mockResponse->expects($this->once())->method('send'); 197 191 $this->frontController->process(); 198 192 } … … 218 212 ->method('isCancelled') 219 213 ->will($this->onConsecutiveCalls(false, true)); 220 $this->mockProcessor->expects($this->any()) 221 ->method('process') 222 ->will($this->returnValue($this->mockProcessor)); 223 $this->mockResponse2 = $this->getMock('stubResponse'); 224 $this->mockResponse2->expects($this->once())->method('send'); 225 $this->mockProcessor->expects($this->once()) 226 ->method('getResponse') 227 ->will($this->returnValue($this->mockResponse2)); 214 $this->mockProcessor->expects($this->any())->method('process'); 215 $this->mockResponse->expects($this->once())->method('send'); 228 216 $this->frontController->process(); 229 217 } … … 251 239 ->will($this->returnValue(array($postInterceptor1, $postInterceptor2))); 252 240 $this->mockRequest->expects($this->any())->method('isCancelled')->will($this->returnValue(false)); 253 $this->mockProcessor->expects($this->any()) 254 ->method('process') 255 ->will($this->returnValue($this->mockProcessor)); 256 $this->mockResponse2 = $this->getMock('stubResponse'); 257 $this->mockResponse2->expects($this->once())->method('send'); 258 $this->mockProcessor->expects($this->once()) 259 ->method('getResponse') 260 ->will($this->returnValue($this->mockResponse2)); 241 $this->mockProcessor->expects($this->any())->method('process'); 242 $this->mockResponse->expects($this->once())->method('send'); 261 243 $this->mockWebsiteCacheFactory->expects($this->once())->method('configure'); 262 244 $this->frontController->setWebsiteCacheFactory($this->mockWebsiteCacheFactory);
