Changeset 1434

Show
Ignore:
Timestamp:
03/18/08 17:08:25 (2 months ago)
Author:
mikey
Message:

implemented refactoring #138: remove decorated response

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/service/jsonrpc/stubJsonRpcProcessor.php

    r1361 r1434  
    99 * @subpackage  service_jsonrpc 
    1010 */ 
    11 stubClassLoader::load('net::stubbles::service::jsonrpc::stubJsonRpcResponse', 
    12                       'net::stubbles::util::stubRegistry', 
     11stubClassLoader::load('net::stubbles::util::stubRegistry', 
    1312                      'net::stubbles::websites::processors::stubAbstractProcessor' 
    1413); 
     
    4342    public function __construct(stubRequest $request, stubSession $session, stubResponse $response, stubPageFactory $pageFactory) 
    4443    { 
    45         $response = new stubJsonRpcResponse($response); 
    4644        parent::__construct($request, $session, $response, $pageFactory); 
    4745        $this->configFile = stubConfig::getConfigPath() . DIRECTORY_SEPARATOR . stubRegistry::getConfig(self::KEY_SERVICE_FILE, 'json-rpc-service.ini'); 
  • trunk/src/main/php/net/stubbles/service/jsonrpc/stubJsonRpcWriter.php

    r1361 r1434  
    11<?php 
    22/** 
    3  * Class for a json-rpc response to a request
     3 * Utility class for creates json data
    44 * 
    55 * @author      Frank Kleine <mikey@stubbles.net> 
     
    77 * @subpackage  service_jsonrpc 
    88 */ 
    9 stubClassLoader::load('net::stubbles::ipo::response::stubDecoratedResponse', 
    10                       'net::stubbles::php::string::stubRecursiveStringEncoder', 
     9stubClassLoader::load('net::stubbles::php::string::stubRecursiveStringEncoder', 
    1110                      'net::stubbles::php::string::stubUTF8Encoder' 
    1211); 
    1312/** 
    14  * Class for a json-rpc response to a request. 
    15  *  
    16  * Decorator around another stubResponse instance. 
     13 * Utility class for creates json data. 
    1714 * 
    1815 * @package     stubbles 
    1916 * @subpackage  service_jsonrpc 
    2017 * @link        http://json-rpc.org/wiki/specification 
     18 * @static 
    2119 */ 
    22 class stubJsonRpcResponse extends stubDecoratedResponse 
     20class stubJsonRpcWriter extends stubBaseObject 
    2321{ 
    2422    /** 
     
    4543     * @param  string  $message  fault message 
    4644     */ 
    47     public function writeFault($reqId, $message) 
     45    public static function writeFault($reqId, $message) 
    4846    { 
    4947        $fault = array('id'     => $reqId, 
     
    5149                       'error'  => self::$encoder->encode($message) 
    5250                 ); 
    53         $this->response->write(json_encode($fault)); 
     51        return json_encode($fault); 
    5452    } 
    5553 
     
    6058     * @param  string  $result 
    6159     */ 
    62     public function writeResponse($reqId, $result) 
     60    public static function writeResponse($reqId, $result) 
    6361    { 
    6462        $response = array('id'     => $reqId, 
     
    6664                          'error'  => null 
    6765                    ); 
    68         $this->response->write(json_encode($response)); 
     66        return json_encode($response); 
    6967    } 
    7068} 
  • trunk/src/main/php/net/stubbles/service/jsonrpc/subprocessors/stubJsonRpcGenerateProxiesSubProcessor.php

    r1361 r1434  
    3434     * @param  stubRequest                         $request   the current request 
    3535     * @param  stubSession                         $session   the current session 
    36      * @param  stubJsonRpcResponse                 $response  the current response 
     36     * @param  stubResponse                        $response  the current response 
    3737     * @param  array<string,array<string,string>>  $classMap  list of available webservice classes 
    3838     */ 
    39     public function process(stubRequest $request, stubSession $session, stubJsonRpcResponse $response, array $classMap) 
     39    public function process(stubRequest $request, stubSession $session, stubResponse $response, array $classMap) 
    4040    { 
    4141        $classes = $request->getValidatedValue(new stubRegexValidator('/^[A-Za-z,0-9_\.]+$/'), '__generateProxy'); 
  • trunk/src/main/php/net/stubbles/service/jsonrpc/subprocessors/stubJsonRpcGenerateSmdSubProcessor.php

    r1361 r1434  
    2424     * @param  stubRequest                         $request   the current request 
    2525     * @param  stubSession                         $session   the current session 
    26      * @param  stubJsonRpcResponse                 $response  the current response 
     26     * @param  stubResponse                        $response  the current response 
    2727     * @param  array<string,array<string,string>>  $classMap  list of available webservice classes 
    2828     */ 
    29     public function process(stubRequest $request, stubSession $session, stubJsonRpcResponse $response, array $classMap) 
     29    public function process(stubRequest $request, stubSession $session, stubResponse $response, array $classMap) 
    3030    { 
    3131        $class     = $request->getValidatedValue(new stubRegexValidator('/^[A-Za-z0-9_\.]+$/'), '__smd'); 
  • trunk/src/main/php/net/stubbles/service/jsonrpc/subprocessors/stubJsonRpcGetSubProcessor.php

    r1361 r1434  
    1010 */ 
    1111stubClassLoader::load('net::stubbles::service::jsonrpc::subprocessors::stubJsonRpcAbstractInvokingSubProcessor', 
     12                      'net::stubbles::service::jsonrpc::stubJsonRpcWriter', 
    1213                      'net::stubbles::util::validators::stubPassThruValidator', 
    1314                      'net::stubbles::util::validators::stubRegexValidator' 
     
    4445     * @param  stubRequest                         $request   the current request 
    4546     * @param  stubSession                         $session   the current session 
    46      * @param  stubJsonRpcResponse                 $response  the current response 
     47     * @param  stubResponse                        $response  the current response 
    4748     * @param  array<string,array<string,string>>  $classMap  list of available webservice classes 
    4849     */ 
    49     public function process(stubRequest $request, stubSession $session, stubJsonRpcResponse $response, array $classMap) 
     50    public function process(stubRequest $request, stubSession $session, stubResponse $response, array $classMap) 
    5051    { 
    5152        $requestId = $request->getValidatedValue(new stubRegexValidator(self::ID_PATTERN), 'id'); 
    5253        if (null === $requestId) { 
    53             $response->writeFault($requestId, 'Invalid request: No id given.'); 
     54            $response->write(stubJsonRpcWriter::writeFault($requestId, 'Invalid request: No id given.')); 
    5455            return; 
    5556        } 
     
    5758        $method = $request->getValidatedValue(new stubPassThruValidator(), 'method'); 
    5859        if (null === $method) { 
    59             $response->writeFault($requestId, 'Invalid request: No method given.'); 
     60            $response->write(stubJsonRpcWriter::writeFault($requestId, 'Invalid request: No method given.')); 
    6061            return; 
    6162        } 
     
    6566            $params    = $this->retrieveGETParams($request, $reflect['method']); 
    6667            $result    = $this->invokeServiceMethod($reflect['class'], $reflect['method'], $params); 
    67             $response->writeResponse($requestId, $result); 
     68            $response->write(stubJsonRpcWriter::writeResponse($requestId, $result)); 
    6869        } catch (Exception $e) { 
    69             $response->writeFault($requestId, $e->getMessage()); 
     70            $response->write(stubJsonRpcWriter::writeFault($requestId, $e->getMessage())); 
    7071        } 
    7172    } 
  • trunk/src/main/php/net/stubbles/service/jsonrpc/subprocessors/stubJsonRpcPostSubProcessor.php

    r1361 r1434  
    1010 */ 
    1111stubClassLoader::load('net::stubbles::service::jsonrpc::subprocessors::stubJsonRpcAbstractInvokingSubProcessor', 
     12                      'net::stubbles::service::jsonrpc::stubJsonRpcWriter', 
    1213                      'net::stubbles::util::validators::stubPassThruValidator' 
    1314); 
     
    2627     * @param  stubRequest                         $request   the current request 
    2728     * @param  stubSession                         $session   the current session 
    28      * @param  stubJsonRpcResponse                 $response  the current response 
     29     * @param  stubResponse                        $response  the current response 
    2930     * @param  array<string,array<string,string>>  $classMap  list of available webservice classes 
    3031     */ 
    31     public function process(stubRequest $request, stubSession $session, stubJsonRpcResponse $response, array $classMap) 
     32    public function process(stubRequest $request, stubSession $session, stubResponse $response, array $classMap) 
    3233    { 
    3334        $requestJsonObj = $request->getValidatedRawData(new stubPassThruValidator()); 
    3435        $phpJsonObj     = json_decode($requestJsonObj); 
    3536        if (is_object($phpJsonObj) === false) { 
    36             $response->writeFault(null, 'Invalid request.'); 
     37            $response->write(stubJsonRpcWriter::writeFault(null, 'Invalid request.')); 
    3738            return; 
    3839        } 
    3940 
    4041        if (isset($phpJsonObj->id) === false) { 
    41             $response->writeFault(null, 'Invalid request: No id given.'); 
     42            $response->write(stubJsonRpcWriter::writeFault(null, 'Invalid request: No id given.')); 
    4243            return; 
    4344        } 
    4445 
    4546        if (isset($phpJsonObj->method) === false) { 
    46             $response->writeFault($phpJsonObj->id, 'Invalid request: No method given.'); 
     47            $response->write(stubJsonRpcWriter::writeFault($phpJsonObj->id, 'Invalid request: No method given.')); 
    4748            return; 
    4849        } 
    4950 
    5051        if (isset($phpJsonObj->params) === false) { 
    51             $response->writeFault($phpJsonObj->id, 'Invalid request: No params given.'); 
     52            $response->write(stubJsonRpcWriter::writeFault($phpJsonObj->id, 'Invalid request: No params given.')); 
    5253            return; 
    5354        } 
     
    6162            $reflect = $this->getClassAndMethod($classMap, $phpJsonObj->method, $className); 
    6263            $result  = $this->invokeServiceMethod($reflect['class'], $reflect['method'], $phpJsonObj->params); 
    63             $response->writeResponse($phpJsonObj->id, $result); 
     64            $response->write(stubJsonRpcWriter::writeResponse($phpJsonObj->id, $result)); 
    6465        } catch (Exception $e) { 
    65             $response->writeFault($phpJsonObj->id, $e->getMessage()); 
     66            $response->write(stubJsonRpcWriter::writeFault($phpJsonObj->id, $e->getMessage())); 
    6667        } 
    6768    } 
  • trunk/src/main/php/net/stubbles/service/jsonrpc/subprocessors/stubJsonRpcSubProcessor.php

    r1361 r1434  
    88 */ 
    99stubClassLoader::load('net::stubbles::ipo::request::stubRequest', 
    10                       'net::stubbles::ipo::session::stubSession', 
    11                       'net::stubbles::service::jsonrpc::stubJsonRpcResponse
     10                      'net::stubbles::ipo::response::stubResponse', 
     11                      'net::stubbles::ipo::session::stubSession
    1212); 
    1313/** 
     
    2424     * @param  stubRequest                         $request   the current request 
    2525     * @param  stubSession                         $session   the current session 
    26      * @param  stubJsonRpcResponse                 $response  the current response 
     26     * @param  stubResponse                        $response  the current response 
    2727     * @param  array<string,array<string,string>>  $classMap  list of available webservice classes 
    2828     */ 
    29     public function process(stubRequest $request, stubSession $session, stubJsonRpcResponse $response, array $classMap); 
     29    public function process(stubRequest $request, stubSession $session, stubResponse $response, array $classMap); 
    3030} 
    3131?> 
  • trunk/src/test/php/net/stubbles/ipo/IPOTestSuite.php

    r1391 r1434  
    6666 
    6767        $suite->addTestFile($dir . '/response/stubCookieTestCase.php'); 
    68         $suite->addTestFile($dir . '/response/stubDecoratedResponseTestCase.php'); 
    6968 
    7069        $suite->addTestFile($dir . '/session/stubAbstractSessionTestCase.php'); 
  • trunk/src/test/php/net/stubbles/service/ServiceTestSuite.php

    r1366 r1434  
    2828        // json-rpc 
    2929        $suite->addTestFile($dir . '/jsonrpc/stubJsonRpcProcessorTestCase.php'); 
    30         $suite->addTestFile($dir . '/jsonrpc/stubJsonRpcResponseTestCase.php'); 
     30        $suite->addTestFile($dir . '/jsonrpc/stubJsonRpcWriterTestCase.php'); 
    3131        $suite->addTestFile($dir . '/jsonrpc/subprocessors/stubJsonRpcAbstractGenerateSubProcessorTestCase.php'); 
    3232        $suite->addTestFile($dir . '/jsonrpc/subprocessors/stubJsonRpcGenerateProxiesSubProcessorTestCase.php'); 
  • trunk/src/test/php/net/stubbles/service/jsonrpc/stubJsonRpcWriterTestCase.php

    r1303 r1434  
    11<?php 
    22/** 
    3  * Test for net::stubbles::service::jsonrpc::stubJsonRpcResponse
     3 * Test for net::stubbles::service::jsonrpc::stubJsonRpcWriter
    44 * 
    55 * @author          Richard Sternagel 
     
    88 * @subpackage      service_jsonrpc_test 
    99 */ 
    10 stubClassLoader::load('net::stubbles::service::jsonrpc::stubJsonRpcResponse'); 
     10stubClassLoader::load('net::stubbles::service::jsonrpc::stubJsonRpcWriter'); 
    1111/** 
    12  * Tests for net::stubbles::service::jsonrpc::stubJsonRpcResponse
     12 * Tests for net::stubbles::service::jsonrpc::stubJsonRpcWriter
    1313 * 
    1414 * @package     stubbles 
    1515 * @subpackage  service_jsonrpc_test 
    1616 */ 
    17 class stubJsonRpcResponseTestCase extends PHPUnit_Framework_TestCase 
     17class stubJsonRpcWriterTestCase extends PHPUnit_Framework_TestCase 
    1818{ 
    19     /** 
    20      * instance to test 
    21      * 
    22      * @var  stubJsonRpcResponse 
    23      */ 
    24     protected $jsonRpcResponse; 
    25     /** 
    26      * mocked response instance 
    27      * 
    28      * @var  PHPUnit_Framework_MockObject_MockObject 
    29      */ 
    30     protected $mockResponse; 
    31  
    32     /** 
    33      * set up test environment 
    34      */ 
    35     public function setUp() 
    36     { 
    37         $this->mockResponse    = $this->getMock('stubResponse'); 
    38         $this->jsonRpcResponse = new stubJsonRpcResponse($this->mockResponse); 
    39     } 
    40  
    4119    /** 
    4220     * test sending a fault 
     
    4624    public function writeFault() 
    4725    { 
    48         $this->mockResponse->expects($this->once())->method('write')->with($this->equalTo('{"id":"12345","result":null,"error":"Test error message."}')); 
    49         $this->jsonRpcResponse->writeFault('12345', 'Test error message.'); 
     26        $this->assertEquals('{"id":"12345","result":null,"error":"Test error message."}', stubJsonRpcWriter::writeFault('12345', 'Test error message.')); 
    5027    } 
    5128 
     
    5734    public function writeResponseWithString() 
    5835    { 
    59         $this->mockResponse->expects($this->once())->method('write')->with($this->equalTo('{"id":"12345","result":"string","error":null}')); 
    60         $this->jsonRpcResponse->writeResponse('12345', 'string'); 
     36        $this->assertEquals('{"id":"12345","result":"string","error":null}', stubJsonRpcWriter::writeResponse('12345', 'string')); 
    6137    } 
    6238 
     
    6844    public function writeResponseWithBool() 
    6945    { 
    70         $this->mockResponse->expects($this->once())->method('write')->with($this->equalTo('{"id":"12345","result":true,"error":null}')); 
    71         $this->jsonRpcResponse->writeResponse('12345', true); 
     46        $this->assertEquals('{"id":"12345","result":true,"error":null}', stubJsonRpcWriter::writeResponse('12345', true)); 
    7247    } 
    7348 
     
    7954    public function writeResponseWithArray() 
    8055    { 
    81         $this->mockResponse->expects($this->once())->method('write')->with($this->equalTo('{"id":"12345","result":[1,2,3],"error":null}')); 
    82         $this->jsonRpcResponse->writeResponse('12345', array(1,2,3)); 
     56        $this->assertEquals('{"id":"12345","result":[1,2,3],"error":null}', stubJsonRpcWriter::writeResponse('12345', array(1,2,3))); 
    8357    } 
    8458} 
  • trunk/src/test/php/net/stubbles/service/jsonrpc/subprocessors/stubJsonRpcAbstractGenerateSubProcessorTestCase.php

    r1361 r1434  
    2121     * @param  stubRequest                         $request   the current request 
    2222     * @param  stubSession                         $session   the current session 
    23      * @param  stubJsonRpcResponse                 $response  the current response 
     23     * @param  stubResponse                        $response  the current response 
    2424     * @param  array<string,array<string,string>>  $classMap  list of available webservice classes 
    2525     */ 
    26     public function process(stubRequest $request, stubSession $session, stubJsonRpcResponse $response, array $classMap) 
     26    public function process(stubRequest $request, stubSession $session, stubResponse $response, array $classMap) 
    2727    { 
    2828        // intentionally empty 
  • trunk/src/test/php/net/stubbles/service/jsonrpc/subprocessors/stubJsonRpcGenerateProxiesSubProcessorTestCase.php

    r1361 r1434  
    9191        $this->jsonRpcGenerateProxiesSubProcessor->expects($this->never()) 
    9292                                                 ->method('handleException'); 
    93         $this->jsonRpcGenerateProxiesSubProcessor->process($this->mockRequest, $this->mockSession, new stubJsonRpcResponse($this->mockResponse), $this->classMap); 
     93        $this->jsonRpcGenerateProxiesSubProcessor->process($this->mockRequest, $this->mockSession, $this->mockResponse, $this->classMap); 
    9494    } 
    9595 
     
    112112                                                 ->will($this->returnValue($this->mockProxyGenerator)); 
    113113        $this->mockResponse->expects($this->once())->method('write')->with($this->equalTo("stubbles.json.proxy = {};\n\n")); 
    114         $response = new stubJsonRpcResponse($this->mockResponse); 
    115114        $this->jsonRpcGenerateProxiesSubProcessor->expects($this->once()) 
    116115                                                 ->method('handleException') 
    117                                                  ->with($this->equalTo($exception, $response, 'Generation of proxy for TestService failed.')); 
    118         $this->jsonRpcGenerateProxiesSubProcessor->process($this->mockRequest, $this->mockSession, $response, $this->classMap); 
     116                                                 ->with($this->equalTo($exception, $this->mockResponse, 'Generation of proxy for TestService failed.')); 
     117        $this->jsonRpcGenerateProxiesSubProcessor->process($this->mockRequest, $this->mockSession, $this->mockResponse, $this->classMap); 
    119118    } 
    120119} 
  • trunk/src/test/php/net/stubbles/service/jsonrpc/subprocessors/stubJsonRpcGenerateSmdSubProcessorTestCase.php

    r1361 r1434  
    8989        $this->jsonRpcGenerateSmdSubProcessor->expects($this->never()) 
    9090                                             ->method('handleException'); 
    91         $this->jsonRpcGenerateSmdSubProcessor->process($this->mockRequest, $this->mockSession, new stubJsonRpcResponse($this->mockResponse), $this->classMap); 
     91        $this->jsonRpcGenerateSmdSubProcessor->process($this->mockRequest, $this->mockSession, $this->mockResponse, $this->classMap); 
    9292    } 
    9393 
     
    115115                                             ->will($this->returnValue($this->mockSmdGenerator)); 
    116116        $this->mockResponse->expects($this->never())->method('write'); 
    117         $response = new stubJsonRpcResponse($this->mockResponse); 
    118117        $this->jsonRpcGenerateSmdSubProcessor->expects($this->once()) 
    119118                                             ->method('handleException') 
    120                                              ->with($this->equalTo($exception, $response, 'Generation of SMD for TestService failed.')); 
    121         $this->jsonRpcGenerateSmdSubProcessor->process($this->mockRequest, $this->mockSession, $response, $this->classMap); 
     119                                             ->with($this->equalTo($exception, $this->mockResponse, 'Generation of SMD for TestService failed.')); 
     120        $this->jsonRpcGenerateSmdSubProcessor->process($this->mockRequest, $this->mockSession, $this->mockResponse, $this->classMap); 
    122121    } 
    123122} 
  • trunk/src/test/php/net/stubbles/service/jsonrpc/subprocessors/stubJsonRpcGetSubProcessorTestCase.php

    r1361 r1434  
    8383        $this->jsonRpcGetSubProcessor->process($this->mockRequest, 
    8484                                               $this->mockSession, 
    85                                                new stubJsonRpcResponse($this->mockResponse)
     85                                               $this->mockResponse
    8686                                               $this->classMap 
    8787        ); 
     
    9999        $this->jsonRpcGetSubProcessor->process($this->mockRequest, 
    100100                                               $this->mockSession, 
    101                                                new stubJsonRpcResponse($this->mockResponse)
     101                                               $this->mockResponse
    102102                                               $this->classMap 
    103103        ); 
     
    115115        $this->jsonRpcGetSubProcessor->process($this->mockRequest, 
    116116                                               $this->mockSession, 
    117                                                new stubJsonRpcResponse($this->mockResponse)
     117                                               $this->mockResponse
    118118                                               $this->classMap 
    119119        ); 
     
    131131        $this->jsonRpcGetSubProcessor->process($this->mockRequest, 
    132132                                               $this->mockSession, 
    133                                                new stubJsonRpcResponse($this->mockResponse)
     133                                               $this->mockResponse
    134134                                               $this->classMap 
    135135        ); 
     
    147147        $this->jsonRpcGetSubProcessor->process($this->mockRequest, 
    148148                                               $this->mockSession, 
    149                                                new stubJsonRpcResponse($this->mockResponse)
     149                                               $this->mockResponse
    150150                                               $this->classMap 
    151151        ); 
     
    163163        $this->jsonRpcGetSubProcessor->process($this->mockRequest, 
    164164                                               $this->mockSession, 
    165                                                new stubJsonRpcResponse($this->mockResponse)
     165                                               $this->mockResponse
    166166                                               $this->classMap 
    167167        ); 
     
    179179        $this->jsonRpcGetSubProcessor->process($this->mockRequest, 
    180180                                               $this->mockSession, 
    181                                                new stubJsonRpcResponse($this->mockResponse)
     181                                               $this->mockResponse
    182182                                               $this->classMap 
    183183        ); 
     
    195195        $this->jsonRpcGetSubProcessor->process($this->mockRequest, 
    196196                                               $this->mockSession, 
    197                                                new stubJsonRpcResponse($this->mockResponse)
     197                                               $this->mockResponse
    198198                                               $this->classMap 
    199199        ); 
     
    211211        $this->jsonRpcGetSubProcessor->process($this->mockRequest, 
    212212                                               $this->mockSession, 
    213                                                new stubJsonRpcResponse($this->mockResponse)
     213                                               $this->mockResponse
    214214                                               $this->classMap 
    215215        ); 
     
    228228        $this->jsonRpcGetSubProcessor->process($this->mockRequest, 
    229229                                               $this->mockSession, 
    230                                                new stubJsonRpcResponse($this->mockResponse)
     230                                               $this->mockResponse
    231231                                               $this->classMap 
    232232        ); 
  • trunk/src/test/php/net/stubbles/service/jsonrpc/subprocessors/stubJsonRpcPostSubProcessorTestCase.php

    r1361 r1434  
    8383        $this->jsonRpcPostSubProcessor->process($this->mockRequest, 
    8484                                                $this->mockSession, 
    85                                                 new stubJsonRpcResponse($this->mockResponse)
     85                                                $this->mockResponse
    8686                                                $this->classMap 
    8787        ); 
     
    9999        $this->jsonRpcPostSubProcessor->process($this->mockRequest, 
    100100                                                $this->mockSession, 
    101                                                 new stubJsonRpcResponse($this->mockResponse)
     101                                                $this->mockResponse
    102102                                                $this->classMap 
    103103        ); 
     
    115115        $this->jsonRpcPostSubProcessor->process($this->mockRequest, 
    116116                                                $this->mockSession, 
    117                                                 new stubJsonRpcResponse($this->mockResponse)
     117                                                $this->mockResponse
    118118                                                $this->classMap 
    119119        ); 
     
    131131        $this->jsonRpcPostSubProcessor->process($this->mockRequest, 
    132132                                                $this->mockSession, 
    133                                                 new stubJsonRpcResponse($this->mockResponse)
     133                                                $this->mockResponse
    134134                                                $this->classMap 
    135135        ); 
     
    147147        $this->jsonRpcPostSubProcessor->process($this->mockRequest, 
    148148                                                $this->mockSession, 
    149                                                 new stubJsonRpcResponse($this->mockResponse)
     149                                                $this->mockResponse
    150150                                                $this->classMap 
    151151        ); 
     
    163163        $this->jsonRpcPostSubProcessor->process($this->mockRequest, 
    164164                                                $this->mockSession, 
    165                                                 new stubJsonRpcResponse($this->mockResponse)
     165                                                $this->mockResponse
    166166                                                $this->classMap 
    167167        ); 
     
    179179        $this->jsonRpcPostSubProcessor->process($this->mockRequest, 
    180180                                                $this->mockSession, 
    181                                                 new stubJsonRpcResponse($this->mockResponse)
     181                                                $this->mockResponse
    182182                                                $this->classMap 
    183183        ); 
     
    195195        $this->jsonRpcPostSubProcessor->process($this->mockRequest, 
    196196                                                $this->mockSession, 
    197                                                 new stubJsonRpcResponse($this->mockResponse)
     197                                                $this->mockResponse
    198198                                                $this->classMap 
    199199        ); 
     
    211211        $this->jsonRpcPostSubProcessor->process($this->mockRequest, 
    212212                                                $this->mockSession, 
    213                                                 new stubJsonRpcResponse($this->mockResponse)
     213                                                $this->mockResponse
    214214                                                $this->classMap 
    215215        ); 
     
    233233        $this->jsonRpcPostSubProcessor->process($this->mockRequest, 
    234234                                                $this->mockSession, 
    235                                                 new stubJsonRpcResponse($this->mockResponse)
    236                                                 $this->classMap 
    237         ); 
    238         $this->jsonRpcPostSubProcessor->process($this->mockRequest, 
    239                                                 $this->mockSession, 
    240                                                 new stubJsonRpcResponse($this->mockResponse)
     235                                                $this->mockResponse
     236                                                $this->classMap 
     237        ); 
     238        $this->jsonRpcPostSubProcessor->process($this->mockRequest, 
     239                                                $this->mockSession, 
     240                                                $this->mockResponse
    241241                                                $this->classMap 
    242242        ); 
     
    254254        $this->jsonRpcPostSubProcessor->process($this->mockRequest, 
    255255                                                $this->mockSession, 
    256                                                 new stubJsonRpcResponse($this->mockResponse)
     256                                                $this->mockResponse
    257257                                                $this->classMap 
    258258        ); 
     
    272272        $this->jsonRpcPostSubProcessor->process($this->mockRequest, 
    273273                                                $this->mockSession, 
    274                                                 new stubJsonRpcResponse($this->mockResponse)
     274                                                $this->mockResponse
    275275                                                $this->classMap 
    276276        ); 
     
    289289        $this->jsonRpcPostSubProcessor->process($this->mockRequest, 
    290290                                                $this->mockSession, 
    291                                                 new stubJsonRpcResponse($this->mockResponse)
     291                                                $this->mockResponse
    292292                                                $this->classMap 
    293293        );