Changeset 1655

Show
Ignore:
Timestamp:
06/24/08 10:55:02 (3 months ago)
Author:
mikey
Message:

better get it right the first time: use correct token, adjust tests

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/websites/cache/stubCachingProcessor.php

    r1513 r1655  
    161161        if (true === $isCachable) { 
    162162            $this->cache->store($this->request, $this->response, $this->processor->getPageName()); 
    163             $this->setSessionData(); 
    164163        } 
     164         
     165        $this->setSessionData(); 
    165166    } 
    166167 
  • trunk/src/main/php/net/stubbles/websites/xml/generator/stubSessionXMLGenerator.php

    r1653 r1655  
    114114        } 
    115115         
    116         $xmlStreamWriter->writeElement('id', array(), '$SID'); 
     116        $xmlStreamWriter->writeElement('id', array(), '$SESSION_ID'); 
    117117        $xmlStreamWriter->writeElement('name', array(), '$SESSION_NAME'); 
    118118        $xmlStreamWriter->writeElement('isNew', array(), (($this->session->isNew() === true) ? ('true') : ('false'))); 
  • trunk/src/test/php/net/stubbles/websites/xml/generator/stubSessionXMLGeneratorTestCase.php

    r1433 r1655  
    108108    public function acceptsCookies() 
    109109    { 
    110         stubRegistry::setConfig(stubSession::NAME_REGISTRY_KEY, 'sessionName'); 
    111110        $this->mockRequest->expects($this->once())->method('acceptsCookies')->will($this->returnValue(true)); 
    112         $this->mockSession->expects($this->once())->method('getId')->will($this->returnValue('foo')); 
    113111        $this->mockSession->expects($this->once())->method('isNew')->will($this->returnValue(true)); 
    114112        $this->mockSession->expects($this->exactly(2))->method('getValue')->will($this->onConsecutiveCalls('variant_name', 'variant_alias')); 
     
    118116'<session>' .  
    119117  '<acceptsCookies>true</acceptsCookies>' .  
    120   '<id>foo</id>' .  
    121   '<name>sessionName</name>' .  
     118  '<id>$SESSION_ID</id>' .  
     119  '<name>$SESSION_NAME</name>' .  
    122120  '<isNew>true</isNew>' .  
    123121  '<variant>' .  
     
    135133    public function doesNotAcceptCookies() 
    136134    { 
    137         stubRegistry::removeConfig(stubSession::NAME_REGISTRY_KEY); 
    138135        $this->mockRequest->expects($this->once())->method('acceptsCookies')->will($this->returnValue(false)); 
    139         $this->mockSession->expects($this->once())->method('getId')->will($this->returnValue('foo')); 
    140136        $this->mockSession->expects($this->once())->method('isNew')->will($this->returnValue(false)); 
    141137        $this->mockSession->expects($this->exactly(2))->method('getValue')->will($this->returnValue(null)); 
     
    145141'<session>' .  
    146142  '<acceptsCookies>false</acceptsCookies>' .  
    147   '<id>foo</id>' .  
    148   '<name>PHPSESSID</name>' .  
     143  '<id>$SESSION_ID</id>' .  
     144  '<name>$SESSION_NAME</name>' .  
    149145  '<isNew>false</isNew>' .  
    150146  '<variant>' .