Changeset 425

Show
Ignore:
Timestamp:
03/26/07 16:18:45 (1 year ago)
Author:
mikey
Message:

added net.stubbles.ipo.request.stubRequest::getURI();

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/ipo/request/stubRequest.php

    r409 r425  
    108108     
    109109    /** 
     110     * returns the uri of the request 
     111     *  
     112     * @return  string 
     113     */ 
     114    public function getURI(); 
     115     
     116    /** 
    110117     * checks whether raw data is valid or not 
    111118     * 
  • trunk/src/main/php/net/stubbles/ipo/request/stubRequestPrefixDecorator.php

    r409 r425  
    185185     
    186186    /** 
     187     * returns the uri of the request 
     188     *  
     189     * @return  string 
     190     */ 
     191    public function getURI() 
     192    { 
     193        return $this->request->getURI(); 
     194    } 
     195     
     196    /** 
    187197     * checks whether raw data is valid or not 
    188198     * 
  • trunk/src/main/php/net/stubbles/ipo/request/stubWebRequest.php

    r409 r425  
    6868     
    6969    /** 
     70     * returns the uri of the request 
     71     *  
     72     * @return  string 
     73     */ 
     74    public function getURI() 
     75    { 
     76        return $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; 
     77    } 
     78     
     79    /** 
    7080     * returns the raw data 
    7181     * 
  • trunk/src/test/php/net/stubbles/ipo/request/stubAbstractRequestTestCase.php

    r423 r425  
    3636    } 
    3737     
     38    public function getURI() 
     39    { 
     40        return 'test://' . __FILE__; 
     41    } 
     42     
    3843    public function setRawData($rawData) 
    3944    { 
  • trunk/src/test/php/net/stubbles/ipo/request/stubRequestPrefixDecoratorTestCase.php

    r409 r425  
    201201     
    202202    /** 
     203     * assure that getURI() is called 
     204     */ 
     205    public function testGetURI() 
     206    { 
     207        $this->mockRequest->expectOnce('getURI'); 
     208        $this->mockRequest->setReturnValue('getURI', 'test'); 
     209        $this->assertEqual($this->request->getURI(), 'test'); 
     210    } 
     211     
     212    /** 
    203213     * assure that raw data is handles correct 
    204214     */