Changeset 1443

Show
Ignore:
Timestamp:
03/20/08 00:17:48 (4 months ago)
Author:
mikey
Message:

refactoring #137, part 5: replaced stubAbstractPageProcessor by interface stubPageBasedProcessor

Files:

Legend:

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

    r1435 r1443  
    3535     * constructor 
    3636     * 
    37      * @param  stubRequest      $request      the current request 
    38      * @param  stubSession      $session      the current session 
    39      * @param  stubResponse     $response     the current response 
    40      * @param  stubPageFactory  $pageFactory  page factory to use to read the page configuration 
     37     * @param  stubRequest   $request   the current request 
     38     * @param  stubSession   $session   the current session 
     39     * @param  stubResponse  $response  the current response 
    4140     */ 
    42     public function __construct(stubRequest $request, stubSession $session, stubResponse $response, stubPageFactory $pageFactory
     41    public function __construct(stubRequest $request, stubSession $session, stubResponse $response
    4342    { 
    44         parent::__construct($request, $session, $response, $pageFactory); 
     43        parent::__construct($request, $session, $response); 
    4544        $this->configFile = stubConfig::getConfigPath() . DIRECTORY_SEPARATOR . stubRegistry::getConfig(self::KEY_SERVICE_FILE, 'json-rpc-service.ini'); 
    4645    } 
  • trunk/src/test/php/net/stubbles/service/jsonrpc/stubJsonRpcProcessorTestCase.php

    r1435 r1443  
    6161{ 
    6262    /** 
    63      * mocked page factory 
    64      * 
    65      * @var  PHPUnit_Framework_MockObject_MockObject 
    66      */ 
    67     protected $mockPageFactory; 
    68     /** 
    6963     * mocked request to use 
    7064     * 
     
    9387        $this->mockSession     = $this->getMock('stubSession'); 
    9488        $this->mockResponse    = $this->getMock('stubResponse'); 
    95         $this->mockPageFactory = $this->getMock('stubPageFactory'); 
    96          
    9789    } 
    9890 
     
    111103                                            array($this->mockRequest, 
    112104                                                  $this->mockSession, 
    113                                                   $this->mockResponse, 
    114                                                   $this->mockPageFactory 
     105                                                  $this->mockResponse 
    115106                                            ) 
    116107                             ); 
     
    136127        $jsonRpcProcessor = new TeststubJsonRpcProcessor($this->mockRequest, 
    137128                                                         $this->mockSession, 
    138                                                          $this->mockResponse, 
    139                                                          $this->mockPageFactory 
     129                                                         $this->mockResponse 
    140130                                ); 
    141131        $jsonRpcProcessor->setConfigFile(vfsStream::url('config/doesNotExist.ini')); 
     
    159149        $jsonRpcProcessor = new TeststubJsonRpcProcessor($this->mockRequest, 
    160150                                                         $this->mockSession, 
    161                                                          $this->mockResponse, 
    162                                                          $this->mockPageFactory 
     151                                                         $this->mockResponse 
    163152                                ); 
    164153        $jsonRpcProcessor->setConfigFile(vfsStream::url('config/json-rpc-service.ini.ini')); 
     
    180169        $jsonRpcProcessor = new TeststubJsonRpcProcessor($this->mockRequest, 
    181170                                                         $this->mockSession, 
    182                                                          $this->mockResponse, 
    183                                                          $this->mockPageFactory 
     171                                                         $this->mockResponse 
    184172                                ); 
    185173        $this->assertEquals('net::stubbles::service::jsonrpc::subprocessors::stubJsonRpcPostSubProcessor', $jsonRpcProcessor->callGetSubProcessorClassName()); 
     
    197185        $jsonRpcProcessor = new TeststubJsonRpcProcessor($this->mockRequest, 
    198186                                                         $this->mockSession, 
    199                                                          $this->mockResponse, 
    200                                                          $this->mockPageFactory 
     187                                                         $this->mockResponse 
    201188                                ); 
    202189        $this->assertEquals('net::stubbles::service::jsonrpc::subprocessors::stubJsonRpcGenerateProxiesSubProcessor', $jsonRpcProcessor->callGetSubProcessorClassName()); 
     
    214201        $jsonRpcProcessor = new TeststubJsonRpcProcessor($this->mockRequest, 
    215202                                                         $this->mockSession, 
    216                                                          $this->mockResponse, 
    217                                                          $this->mockPageFactory 
     203                                                         $this->mockResponse 
    218204                                ); 
    219205        $this->assertEquals('net::stubbles::service::jsonrpc::subprocessors::stubJsonRpcGenerateSmdSubProcessor', $jsonRpcProcessor->callGetSubProcessorClassName()); 
     
    231217        $jsonRpcProcessor = new TeststubJsonRpcProcessor($this->mockRequest, 
    232218                                                         $this->mockSession, 
    233                                                          $this->mockResponse, 
    234                                                          $this->mockPageFactory 
     219                                                         $this->mockResponse 
    235220                                ); 
    236221        $this->assertEquals('net::stubbles::service::jsonrpc::subprocessors::stubJsonRpcGetSubProcessor', $jsonRpcProcessor->callGetSubProcessorClassName());